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

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

  • Best score: 12
  • Best player score: 12
  • Position: #173 / 1585
  • Number of attempts: 6
Changing URL path in CSS - 129 entries

What's the quickest way to swap out all the URLs in a CSS file? Is it wasted keystrokes using look-behinds and look-aheads? (I'm sorry for the delete/report--I made a mistake with the last one requiring an ugly search for graphic to replace with images. I just intended this to be a simple search and replace that might possibly generate some macros or normals solutions that are quicker)

  • Best score: 40
  • Best player score: 56
  • Position: #49 / 59
  • Number of attempts: 1
remove dupes from array - 1336 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 28
  • Position: #287 / 331
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 6576 entries

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

  • Best score: 32
  • Best player score: 41
  • Position: #846 / 1619
  • Number of attempts: 4
Chris LeBlanc
Twitter:

entered into 4 challenges

contributed 0 challenges