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

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

  • Best score: 5
  • Best player score: 5
  • Position: #158 / 449
  • Number of attempts: 1
Don't know what this is - 2048 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: #588 / 592
  • Number of attempts: 1
Word frequency alignment - 307 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 / 165
  • Number of attempts: 3
Enumerate words - 272 entries

Enumerate the unique words in order.

  • Best score: 23
  • Best player score: 27
  • Position: #59 / 94
  • Number of attempts: 2
Execute immediate SQL - 107 entries

Sql string tranformation ...

  • Best score: 58
  • Best player score: 92
  • Position: #34 / 34
  • Number of attempts: 1
The name of the game - 682 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #90 / 366
  • Number of attempts: 2
Saving the hashes(#) - 2115 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: #274 / 487
  • Number of attempts: 2
Vertical Limit - 2634 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #435 / 776
  • Number of attempts: 4
imports alignment (python) - 719 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 37
  • Position: #179 / 201
  • Number of attempts: 1
HTML to Haml - 905 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 47
  • Position: #158 / 207
  • Number of attempts: 3
Reformat long lines - 376 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: #76 / 138
  • Number of attempts: 2
Ruby 1.9 hashes - 1293 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: #148 / 417
  • Number of attempts: 6
Assignment Alignment - 905 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 29
  • Position: #146 / 226
  • Number of attempts: 1
Reverse and count - 489 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: #156 / 180
  • Number of attempts: 1
The Cake is a Lie - 1399 entries

Correct the capitalization of each word

  • Best score: 8
  • Best player score: 11
  • Position: #422 / 541
  • Number of attempts: 2
Make Fancy Header - 1089 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 23
  • Position: #287 / 354
  • Number of attempts: 2
Change the content of a string - 1779 entries

This docstring is a complete lie. Fix it.

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

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

  • Best score: 33
  • Best player score: 33
  • Position: #55 / 611
  • Number of attempts: 4
Add fold markers to a .c file - 721 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: #139 / 201
  • Number of attempts: 3
Reconstruct the Sentence - 1733 entries

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

  • Best score: 19
  • Best player score: 21
  • Position: #225 / 455
  • Number of attempts: 1
Braces or Brackets? - 1184 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: #162 / 358
  • Number of attempts: 2
Whitespace, empty lines and tabs - 4025 entries

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

  • Best score: 16
  • Best player score: 22
  • Position: #330 / 857
  • Number of attempts: 5
Flodder-challenge - 1490 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 42
  • Position: #289 / 377
  • Number of attempts: 4
Simple text editing with Vim - 13576 entries

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

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

entered into 24 challenges

contributed 0 challenges