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

Reformat/Refactor a Golfer Class - 5391 entries

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

  • Best score: 32
  • Best player score: 50
  • Number of attempts: 2
Going underground.... - 283 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
  • Number of attempts: 1
Unwrap the text of an email message - 135 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
  • Number of attempts: 2
quotes inside quotes - 2684 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: 2
  • Best player score: 15
  • Number of attempts: 2
I forgot quotes - 10858 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Number of attempts: 1
Condensed Cases - 670 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
  • Number of attempts: 2
Simple text editing with Vim - 10129 entries

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

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 5
Remove noise from HTTP log - 597 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
  • Number of attempts: 1
Words in parens - 10644 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 2
Just the middle - 8769 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 3
Restore order to the alphabet - 149 entries

The numbers are OK. The letters are wonky.

  • Best score: 12
  • Best player score: 27
  • Number of attempts: 1
Stairs Indenting - 359 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 25
  • Number of attempts: 2
Basic renumbering - 4380 entries

Renumbering Basic.

  • Best score: 2
  • Best player score: 23
  • Number of attempts: 4
Raphael
Twitter:

entered into 13 challenges

contributed 0 challenges