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

Whitespace, empty lines and tabs - 2557 entries

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

  • Best score: 16
  • Best player score: 31
  • Number of attempts: 2
Saving the hashes(#) - 1770 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: 29
  • Number of attempts: 2
Numbering a List - 1743 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Number of attempts: 3
Search and Replace 0 - 4166 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 5
switch variable - 4344 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 3
A simple change - 362 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
A Simple One - 845 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
replacing each line of a block selection - 2542 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 27
  • Number of attempts: 2
quotes inside quotes - 2804 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: 14
  • Number of attempts: 6
Simple text editing with Vim - 10540 entries

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

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 3
Words in parens - 11172 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 6
Switch function arguments - 1843 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 2
Hole-in-one - 936 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 20
  • Number of attempts: 3
Vertical Limit - 2126 entries

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

  • Best score: 21
  • Best player score: 26
  • Number of attempts: 2
Reverse and double space - 408 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 1
Ben Lambeth
Twitter:

entered into 15 challenges

contributed 0 challenges