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

Reformat/Refactor a Golfer Class - 5661 entries

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

  • Best score: 32
  • Best player score: 40
  • Number of attempts: 1
Saving the hashes(#) - 1861 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 37
  • Number of attempts: 1
VimGolfNight - 469 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 1
Make it more readable - 1797 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 19
  • Number of attempts: 1
switch variable - 4614 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 1
Search and Replace 0 - 4434 entries

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

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 1
Vertical Limit - 2230 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 29
  • Number of attempts: 1
Words in parens - 11996 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 23
  • Number of attempts: 1
Switch function arguments - 1876 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 16
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1338 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 20
  • Number of attempts: 1
quotes inside quotes - 2942 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 33
  • Number of attempts: 1
Delete unwanted lines - 347 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 11
  • Number of attempts: 2
Whitespace, empty lines and tabs - 2715 entries

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

  • Best score: 16
  • Best player score: 34
  • Number of attempts: 1
Sami Niiranen
Twitter:

entered into 13 challenges

contributed 0 challenges