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

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

  • Best score: 5
  • Best player score: 6
  • Position: #288 / 352
  • Number of attempts: 1
Search and Replace 0 - 4651 entries

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

  • Best score: 12
  • Best player score: 16
  • Position: #1072 / 1541
  • Number of attempts: 1
Interweave two blocks of text - 574 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: #85 / 204
  • Number of attempts: 1
Python Hello World! Reformatting - 897 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: 45
  • Position: #250 / 350
  • Number of attempts: 1
Line Zipper - 443 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Position: #124 / 206
  • Number of attempts: 1
The holy-grail may help - 315 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #153 / 194
  • Number of attempts: 1
Shebangs for all - 1771 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: 14
  • Position: #193 / 467
  • Number of attempts: 1
A Simple One - 924 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: #9 / 612
  • Number of attempts: 1
Table Reshuffle - 349 entries

Fix the column order in this table... also append the new 'username' column.

  • Best score: 22
  • Best player score: 32
  • Position: #68 / 127
  • Number of attempts: 1
Reverse and count - 412 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: 26
  • Position: #81 / 158
  • Number of attempts: 3
Sorting paragraphs - 494 entries

Order the paragraphs correctly, per prefixed index

  • Best score: 18
  • Best player score: 43
  • Position: #123 / 152
  • Number of attempts: 1
The Cake is a Lie - 1203 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #41 / 488
  • Number of attempts: 3
Context insensitive completion 0 - 468 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: 7
  • Best player score: 7
  • Position: #21 / 221
  • Number of attempts: 1
Context Insensitive completion 1 - 427 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 18
  • Position: #38 / 222
  • Number of attempts: 2
Make Fancy Header - 963 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 17
  • Position: #150 / 326
  • Number of attempts: 2
Reformat some Python - 554 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 41
  • Position: #93 / 221
  • Number of attempts: 2
Reformat a C golf submission - 523 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: 33
  • Position: #107 / 194
  • Number of attempts: 1
Reformat most common surnames - 586 entries

Reformat copy-pasted table into a list of the most common surnames

  • Best score: 23
  • Best player score: 29
  • Position: #92 / 186
  • Number of attempts: 2
Get rid of html tags - 341 entries

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

  • Best score: 15
  • Best player score: 17
  • Position: #46 / 207
  • Number of attempts: 1
Deleting folded text - 289 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: 22
  • Position: #67 / 106
  • Number of attempts: 1
Reconstruct the Sentence - 1151 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: #133 / 347
  • Number of attempts: 1
Simple text editing with Vim - 11634 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #692 / 3412
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 6015 entries

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

  • Best score: 32
  • Best player score: 51
  • Position: #1252 / 1482
  • Number of attempts: 2
Pierre
Twitter:

entered into 23 challenges

contributed 0 challenges