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 - 11454 entries

Delete the instructions at the top and bottom.

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

Renumbering Basic.

  • Best score: 11
  • Best player score: 23
  • Position: #980 / 1264
  • Number of attempts: 4
Restore order to the alphabet - 201 entries

The numbers are OK. The letters are wonky.

  • Best score: 12
  • Best player score: 27
  • Position: #64 / 72
  • Number of attempts: 1
Condensed Cases - 804 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: #193 / 247
  • Number of attempts: 2
I forgot quotes - 15983 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2406 / 4180
  • Number of attempts: 1
Going underground.... - 356 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: #116 / 128
  • Number of attempts: 1
quotes inside quotes - 3159 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: #415 / 1078
  • Number of attempts: 2
Words in parens - 12935 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2005 / 3963
  • Number of attempts: 2
Stairs Indenting - 473 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 25
  • Position: #186 / 197
  • Number of attempts: 2
Unwrap the text of an email message - 192 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 / 75
  • Number of attempts: 2
Remove noise from HTTP log - 717 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: #238 / 273
  • Number of attempts: 1
Simple text editing with Vim - 12811 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #2053 / 3694
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 6982 entries

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

  • Best score: 28
  • Best player score: 50
  • Position: #1385 / 1706
  • Number of attempts: 2
Raphael
Twitter:

entered into 13 challenges

contributed 0 challenges