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

Just the middle - 11283 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #18 / 4140
  • Number of attempts: 3
Basic renumbering - 5486 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 23
  • Position: #961 / 1243
  • Number of attempts: 4
Restore order to the alphabet - 183 entries

The numbers are OK. The letters are wonky.

  • Best score: 12
  • Best player score: 27
  • Position: #59 / 66
  • Number of attempts: 1
Condensed Cases - 773 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 17
  • Position: #186 / 238
  • Number of attempts: 2
I forgot quotes - 15840 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2375 / 4133
  • Number of attempts: 1
Going underground.... - 315 entries

Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...

  • Best score: 22
  • Best player score: 44
  • Position: #111 / 122
  • Number of attempts: 1
quotes inside quotes - 3077 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: 15
  • Position: #405 / 1057
  • Number of attempts: 2
Words in parens - 12788 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #1983 / 3930
  • Number of attempts: 2
Stairs Indenting - 440 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 25
  • Position: #180 / 189
  • Number of attempts: 2
Unwrap the text of an email message - 180 entries

Reverse of "Wrap the text of an email message to 79 characters". gq and gw are great for wrapping paragraphs. But sometimes other programs choke on your wrapped lines. What's the best way to un-gq?

  • Best score: 16
  • Best player score: 16
  • Position: #20 / 71
  • Number of attempts: 2
Remove noise from HTTP log - 668 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 18
  • Position: #233 / 264
  • Number of attempts: 1
Simple text editing with Vim - 11862 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 15
  • Position: #1924 / 3471
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 6224 entries

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

  • Best score: 32
  • Best player score: 50
  • Position: #1276 / 1532
  • Number of attempts: 2
Raphael
Twitter:

entered into 13 challenges

contributed 0 challenges