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

prepend * to every non-blank line - 5977 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 35
  • Position: #1442 / 1468
  • Number of attempts: 1
Add semicolons - 10545 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 14
  • Position: #2086 / 2989
  • Number of attempts: 3
Extract argument from function - 2218 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 17
  • Position: #555 / 729
  • Number of attempts: 1
Search and Replace 0 - 4676 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #333 / 1549
  • Number of attempts: 7
Neither Fizz nor Buzz - 221 entries

Not your regular increment macro! The gaps are tricky.

  • Best score: 13
  • Best player score: 24
  • Position: #87 / 97
  • Number of attempts: 2
Do you demand a shrubbery? - 1107 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 32
  • Position: #227 / 292
  • Number of attempts: 1
Where should I put the Newline? - 845 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Position: #80 / 422
  • Number of attempts: 2
Shuffle puzzle - 307 entries

Sort the lines in each indent group, and sort the groups. That's the pattern. Or just move lines around manually to get a better score.

  • Best score: 13
  • Best player score: 19
  • Position: #93 / 100
  • Number of attempts: 2
attr_aligner - 3402 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 36
  • Position: #582 / 685
  • Number of attempts: 1
quotes inside quotes - 3030 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: #159 / 1045
  • Number of attempts: 4
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 25
  • Position: #3722 / 3919
  • Number of attempts: 1
Saving the hashes(#) - 1966 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: 31
  • Position: #400 / 467
  • Number of attempts: 1
Simple text editing with Vim - 11657 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #2257 / 3418
  • Number of attempts: 2
Paul Rodgers
Twitter:

entered into 13 challenges

contributed 0 challenges