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

Make Fancy Header - 929 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 4
Get rid of html tags - 316 entries

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

  • Best score: 15
  • Best player score: 20
  • Number of attempts: 4
Sort and add attributes - 1113 entries

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

  • Best score: 33
  • Best player score: 33
  • Number of attempts: 4
Ruby 1.9 compat - 566 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: 22
  • 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: 43
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 5698 entries

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

  • Best score: 32
  • Best player score: 42
  • Number of attempts: 1
Simple text editing with Vim - 11097 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: 8
82 bottles of beer on the wall - 280 entries

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

  • Best score: 107
  • Best player score: 146
  • Number of attempts: 2
Change the content of a string - 1267 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 6
Increment, increment, increment.... - 524 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 1
A Simple One - 854 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: 2
Ruby 1.9 hashes - 1113 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
  • Number of attempts: 2
Another Mixed-Up Haiku - 202 entries

VimGolf ... a perfect evening?

  • Best score: 21
  • Best player score: 21
  • Number of attempts: 3
Reverse and count - 383 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: 29
  • Number of attempts: 1
The Cake is a Lie - 1166 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 3
Table Reshuffle - 326 entries

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

  • Best score: 22
  • Best player score: 28
  • Number of attempts: 2
Reformat some Python - 519 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 47
  • Number of attempts: 1
Dmytro Shteflyuk
Twitter:

I'm a web developer who loves Ruby and Rails, Macs, and good TV shows. Currently working at Scribd (and very excited about it)

entered into 17 challenges

contributed 0 challenges