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

Swap values - 4707 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 15
  • Position: #910 / 1294
  • Number of attempts: 3
Word Blender - 157 entries

The insides of long words seem to have been run through the blender. Can you fix this famous tale, brave knight?

  • Best score: 28
  • Best player score: 71
  • Position: #44 / 59
  • Number of attempts: 2
Search and Replace 0 - 5167 entries

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

  • Best score: 12
  • Best player score: 16
  • Position: #1179 / 1677
  • Number of attempts: 1
Interweave two blocks of text - 693 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: 18
  • Position: #135 / 218
  • Number of attempts: 2
Python Hello World! Reformatting - 1057 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 42
  • Position: #91 / 402
  • Number of attempts: 3
Insert a Markdown link - 474 entries

Put a link in a markdown document, using the after-the-paragraph format.

  • Best score: 22
  • Best player score: 29
  • Position: #133 / 158
  • Number of attempts: 1
Solve the Sokoban - 202 entries

A wink for all Vimgolfers that play Nethack too.

  • Best score: 25
  • Best player score: 32
  • Position: #60 / 76
  • Number of attempts: 2
The holy-grail may help - 408 entries

Can you find it in less than 20 strokes, Arthur?

  • Best score: 16
  • Best player score: 16
  • Position: #7 / 222
  • Number of attempts: 3
Assignment Alignment - 909 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 25
  • Position: #119 / 226
  • Number of attempts: 2
Shebangs for all - 2105 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 15
  • Position: #249 / 534
  • Number of attempts: 2
Round Round - 328 entries

Round Round

  • Best score: 19
  • Best player score: 276
  • Position: #80 / 89
  • Number of attempts: 1
82 bottles of beer on the wall - 330 entries

Take them down. (sorry, only 82 bottles because the problem size is limited!)

  • Best score: 106
  • Best player score: 129
  • Position: #70 / 150
  • Number of attempts: 2
Reverse Simple Deletion - 875 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #130 / 467
  • Number of attempts: 2
Increment, increment, increment.... - 710 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #99 / 418
  • Number of attempts: 2
Hatsuyume - 583 entries

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

  • Best score: 15
  • Best player score: 32
  • Position: #148 / 195
  • Number of attempts: 2
Dumb to smart - 116 entries

Turn dumb quote to smart vim's way.

  • Best score: 27
  • Best player score: 32
  • Position: #32 / 60
  • Number of attempts: 1
The Cake is a Lie - 1419 entries

Correct the capitalization of each word

  • Best score: 8
  • Best player score: 9
  • Position: #3 / 544
  • Number of attempts: 2
Context insensitive completion 0 - 611 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: 8
  • Position: #142 / 258
  • Number of attempts: 2
Remove Accent off the Letter - 158 entries

Remove all the accent from extremely accented statements.

  • Best score: 37
  • Best player score: 79
  • Position: #47 / 54
  • Number of attempts: 1
Compile C - 454 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 22
  • Position: #88 / 146
  • Number of attempts: 4
Almost encrypted - 212 entries

Convert the first paragraph to be even less readable.

  • Best score: 5
  • Best player score: 5
  • Position: #11 / 150
  • Number of attempts: 1
Make Fancy Header - 1111 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 16
  • Position: #4 / 357
  • Number of attempts: 3
Remember FizzBuzz? - 829 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 82
  • Position: #176 / 212
  • Number of attempts: 1
Deleting folded text - 429 entries

The text below contains three folds. Delete them (and the text inside them). For example: 123 456 /*{{{*/ 789 /*}}}*/ 012 Should become: 123 012 Also, add `aoeuaoeu` to make sure small solutions don't get flagged as cheating.

  • Best score: 17
  • Best player score: 19
  • Position: #30 / 131
  • Number of attempts: 4
Add fold markers to a .c file - 740 entries

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

  • Best score: 27
  • Best player score: 40
  • Position: #157 / 204
  • Number of attempts: 2
Reconstruct the Sentence - 1757 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: 55
  • Position: #438 / 459
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7722 entries

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

  • Best score: 7
  • Best player score: 50
  • Position: #1475 / 1896
  • Number of attempts: 1

Contributed Challenges

Remember FizzBuzz? - 829 entries

Output FizzBuzz to 100. Start with nothing.

Jordan Lewis
Twitter:

Software engineer at @cockroachdb.

entered into 27 challenges

contributed 1 challenges