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 - 4989 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #291 / 1624
  • Number of attempts: 5
quotes inside quotes - 3159 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 / 1078
  • Number of attempts: 6
Words in parens - 12935 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1322 / 3963
  • 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 - 461 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #19 / 191
  • 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 - 2538 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #450 / 754
  • Number of attempts: 2
replacing each line of a block selection - 2999 entries

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

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

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 15
  • Position: #555 / 663
  • 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 - 5071 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1343 / 1748
  • Number of attempts: 3
Numbering a List - 1931 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Position: #396 / 652
  • Number of attempts: 3
A Simple One - 1050 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 / 664
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3665 entries

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

  • Best score: 16
  • Best player score: 31
  • Position: #558 / 787
  • Number of attempts: 2
Simple text editing with Vim - 12811 entries

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

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

entered into 15 challenges

contributed 0 challenges