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

Search and Replace 0 - 5002 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #291 / 1629
  • Number of attempts: 5
quotes inside quotes - 3165 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
  • Position: #119 / 1079
  • Number of attempts: 6
Words in parens - 12966 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1327 / 3968
  • Number of attempts: 6
Hole-in-one - 1018 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
  • Position: #195 / 304
  • Number of attempts: 3
A simple change - 468 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #19 / 193
  • Number of attempts: 3
Saving the hashes(#) - 2063 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
  • Position: #326 / 480
  • Number of attempts: 2
Vertical Limit - 2540 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #451 / 755
  • Number of attempts: 2
replacing each line of a block selection - 3001 entries

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

  • Best score: 18
  • Best player score: 27
  • Position: #586 / 778
  • Number of attempts: 2
Switch function arguments - 2140 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 15
  • Position: #555 / 664
  • Number of attempts: 2
Reverse and double space - 500 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Position: #147 / 199
  • Number of attempts: 1
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1344 / 1749
  • Number of attempts: 3
Numbering a List - 1935 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Position: #398 / 654
  • Number of attempts: 3
A Simple One - 1057 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: #364 / 667
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3727 entries

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

  • Best score: 16
  • Best player score: 31
  • Position: #566 / 800
  • Number of attempts: 2
Simple text editing with Vim - 12929 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #2090 / 3723
  • Number of attempts: 3
Ben Lambeth
Twitter:

entered into 15 challenges

contributed 0 challenges