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: #237 / 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: 19
  • Position: #983 / 1079
  • Number of attempts: 1
Words in parens - 12966 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 23
  • Position: #3615 / 3968
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 425 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 10
  • Position: #61 / 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: 30
  • Position: #372 / 480
  • Number of attempts: 1
Vertical Limit - 2540 entries

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

  • Best score: 21
  • Best player score: 27
  • Position: #522 / 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: 37
  • Position: #747 / 778
  • Number of attempts: 1
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #757 / 1749
  • Number of attempts: 1
Sort and add attributes - 1475 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Position: #161 / 573
  • Number of attempts: 3
Braces or Brackets? - 1043 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 48
  • Position: #209 / 322
  • 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: 27
  • Position: #460 / 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: 20
  • Position: #2800 / 3723
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7099 entries

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

  • Best score: 28
  • Best player score: 40
  • Position: #812 / 1741
  • Number of attempts: 1
Sheng
Twitter:

Currently building the future of healthcare @drchrono. Slowly approaching senior year @NorthwesternU.

entered into 13 challenges

contributed 0 challenges