Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put [challenge ID]

Played Challenges

Simple, Practical, and Common - 32992 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 41
  • Position: #6996 / 7283
  • Number of attempts: 1
One number per line - 18426 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 25
  • Position: #3247 / 3799
  • Number of attempts: 2
Extract argument from function - 2257 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 17
  • Position: #608 / 733
  • Number of attempts: 1
Just the middle - 11261 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #693 / 4135
  • Number of attempts: 5
Collect List - 4190 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 15
  • Position: #705 / 1169
  • Number of attempts: 5
-a-b-c- - 3125 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #945 / 1114
  • Number of attempts: 2
Where should I put the Newline? - 845 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Position: #179 / 422
  • Number of attempts: 2
quotes inside quotes - 3051 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 16
  • Position: #615 / 1050
  • Number of attempts: 3
Saving the hashes(#) - 1973 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 30
  • Position: #385 / 468
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 6066 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 32
  • Best player score: 47
  • Position: #1161 / 1496
  • Number of attempts: 2
Thiago Belem
Twitter:

Software Engineer & Teacher

entered into 10 challenges

contributed 0 challenges