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

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

  • Best score: 5
  • Best player score: 5
  • Position: #65 / 421
  • Number of attempts: 1
Search and Replace 0 - 5004 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 12
  • Position: #121 / 1630
  • Number of attempts: 4
Interweave two blocks of text - 661 entries

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

  • Best score: 15
  • Best player score: 17
  • Position: #91 / 215
  • Number of attempts: 1
Line Zipper - 477 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Position: #127 / 216
  • Number of attempts: 1
Case preserving word replacement - 454 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

  • Best score: 19
  • Best player score: 19
  • Position: #20 / 180
  • Number of attempts: 4
imports alignment (python) - 700 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 20
  • Position: #77 / 198
  • Number of attempts: 4
Numbering a List - 1935 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #195 / 654
  • Number of attempts: 4
A Simple One - 1057 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #209 / 667
  • Number of attempts: 3
Round Round - 321 entries

Round Round

  • Best score: 19
  • Best player score: 109
  • Position: #70 / 88
  • Number of attempts: 1
Ruby 1.9 compat - 634 entries

Remember when Ruby supported `when <expr> :`? Well, it doesn't in 1.9, so let's make sure we use `then`, without ruining our lovely new hash syntax!

  • Best score: 14
  • Best player score: 14
  • Position: #21 / 235
  • Number of attempts: 4
Reverse Simple Deletion - 854 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #199 / 460
  • Number of attempts: 1
Increment, increment, increment.... - 692 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #207 / 410
  • Number of attempts: 2
Sorting paragraphs - 552 entries

Order the paragraphs correctly, per prefixed index

  • Best score: 18
  • Best player score: 33
  • Position: #100 / 165
  • Number of attempts: 1
Hatsuyume - 540 entries

http://en.wikipedia.org/wiki/Hatsuyume

  • Best score: 15
  • Best player score: 24
  • Position: #73 / 187
  • Number of attempts: 5
The Cake is a Lie - 1361 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #98 / 531
  • Number of attempts: 2
Fix the Haiku - 313 entries

Change this slightly scrambled haiku to its unscrambled form and fix the capitalisation and punctuation along the way.

  • Best score: 28
  • Best player score: 47
  • Position: #90 / 114
  • Number of attempts: 1
Context insensitive completion 0 - 585 entries

Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.

  • Best score: 6
  • Best player score: 7
  • Position: #54 / 248
  • Number of attempts: 2
Compile C - 430 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 21
  • Position: #50 / 141
  • Number of attempts: 2
Reformat a C golf submission - 612 entries

Take this C golf submission (for the "tiny but standards-compliant Hello World program" category, naturally), and turn it into formatted C code.

  • Best score: 22
  • Best player score: 41
  • Position: #181 / 209
  • Number of attempts: 1
Reverse characters in a line - 776 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 13
  • Position: #33 / 267
  • Number of attempts: 4
Remember FizzBuzz? - 738 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 63
  • Position: #129 / 193
  • Number of attempts: 2
Get rid of html tags - 407 entries

Want to read more about Vim's background? Then get rid of those html tags...

  • Best score: 12
  • Best player score: 26
  • Position: #211 / 236
  • Number of attempts: 3
Change the content of a string - 1591 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #51 / 593
  • Number of attempts: 2
Sort and add attributes - 1477 entries

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

  • Best score: 33
  • Best player score: 33
  • Position: #71 / 575
  • Number of attempts: 3
Reconstruct the Sentence - 1589 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: 20
  • Position: #29 / 425
  • Number of attempts: 3
Whitespace, empty lines and tabs - 3742 entries

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

  • Best score: 16
  • Best player score: 19
  • Position: #197 / 803
  • Number of attempts: 6
Simple text editing with Vim - 12971 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #16 / 3733
  • Number of attempts: 5
Sammasati
Twitter:

entered into 27 challenges

contributed 0 challenges