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

Line Zipper - 402 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 1
Interweave two blocks of text - 523 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
  • Number of attempts: 1
The holy-grail may help - 304 entries

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

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 1
Shebangs for all - 1690 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
  • Number of attempts: 1
Reverse and count - 384 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
  • Number of attempts: 3
Make Fancy Header - 929 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 2
The Cake is a Lie - 1168 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 3
A Simple One - 862 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
  • Number of attempts: 1
Table Reshuffle - 326 entries

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

  • Best score: 22
  • Best player score: 32
  • Number of attempts: 1
Context Insensitive completion 1 - 405 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 2
Context insensitive completion 0 - 461 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
  • Number of attempts: 1
Sorting paragraphs - 455 entries

Order the paragraphs correctly, per prefixed index

  • Best score: 18
  • Best player score: 43
  • Number of attempts: 1
Python Hello World! Reformatting - 859 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
  • Number of attempts: 1
Reformat some Python - 531 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 41
  • Number of attempts: 2
Reformat a C golf submission - 492 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
  • Number of attempts: 1
Search and Replace 0 - 4479 entries

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

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 1
Deleting folded text - 279 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
  • Number of attempts: 1
Get rid of html tags - 319 entries

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

  • Best score: 15
  • Best player score: 17
  • Number of attempts: 1
Reformat most common surnames - 539 entries

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

  • Best score: 23
  • Best player score: 29
  • Number of attempts: 2
Wrap the text of an email message to 79 characters - 521 entries

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

  • Best score: 5
  • Best player score: 6
  • Number of attempts: 1
Reconstruct the Sentence - 1042 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
  • Number of attempts: 1
Simple text editing with Vim - 11231 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 5742 entries

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

  • Best score: 32
  • Best player score: 51
  • Number of attempts: 2
Pierre
Twitter:

entered into 23 challenges

contributed 0 challenges