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

Wrap the text of an email message to 79 characters - 679 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #158 / 386
  • Number of attempts: 1
Don't know what this is - 1978 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 24
  • Position: #574 / 578
  • Number of attempts: 1
Word frequency alignment - 273 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Position: #13 / 156
  • Number of attempts: 3
Enumerate words - 250 entries

Enumerate the unique words in order.

  • Best score: 23
  • Best player score: 27
  • Position: #56 / 89
  • Number of attempts: 2
Execute immediate SQL - 85 entries

Sql string tranformation ...

  • Best score: 60
  • Best player score: 92
  • Position: #30 / 30
  • Number of attempts: 1
The name of the game - 650 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #90 / 356
  • Number of attempts: 2
Saving the hashes(#) - 1992 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: 28
  • Position: #265 / 473
  • Number of attempts: 2
Vertical Limit - 2437 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 26
  • Position: #413 / 736
  • Number of attempts: 4
imports alignment (python) - 661 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 37
  • Position: #173 / 194
  • Number of attempts: 1
HTML to Haml - 842 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 47
  • Position: #154 / 202
  • Number of attempts: 3
Reformat long lines - 341 entries

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

  • Best score: 15
  • Best player score: 18
  • Position: #72 / 130
  • Number of attempts: 2
Ruby 1.9 hashes - 1221 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 12
  • Best player score: 13
  • Position: #139 / 401
  • Number of attempts: 6
Assignment Alignment - 832 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 29
  • Position: #140 / 215
  • Number of attempts: 1
Reverse and count - 456 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

  • Best score: 18
  • Best player score: 34
  • Position: #150 / 172
  • Number of attempts: 1
The Cake is a Lie - 1286 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 11
  • Position: #400 / 512
  • Number of attempts: 2
Make Fancy Header - 1014 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 23
  • Position: #274 / 338
  • Number of attempts: 2
Change the content of a string - 1475 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #43 / 557
  • Number of attempts: 9
Sort and add attributes - 1327 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Position: #55 / 529
  • Number of attempts: 4
Add fold markers to a .c file - 556 entries

Fold markers can make it easier to navigate source code. Add them to this .c file.

  • Best score: 30
  • Best player score: 37
  • Position: #120 / 172
  • Number of attempts: 3
Reconstruct the Sentence - 1363 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 20
  • Best player score: 21
  • Position: #192 / 383
  • Number of attempts: 1
Braces or Brackets? - 884 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 44
  • Position: #134 / 288
  • Number of attempts: 2
Whitespace, empty lines and tabs - 3339 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 22
  • Position: #277 / 736
  • Number of attempts: 5
Flodder-challenge - 1117 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 42
  • Position: #242 / 311
  • Number of attempts: 4
Simple text editing with Vim - 12281 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #994 / 3580
  • Number of attempts: 7
Tom Duijf
Twitter:

entered into 24 challenges

contributed 0 challenges