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

lamb had a little Mary - 507 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 39
  • Number of attempts: 1
Simple, Practical, and Common - 27133 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 31
  • Number of attempts: 1
attr_aligner - 3086 entries

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

  • Best score: 19
  • Best player score: 21
  • Number of attempts: 7
Saving the hashes(#) - 1806 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: 21
  • Number of attempts: 7
I forgot quotes - 12851 entries

Oops.

  • Best score: 10
  • Best player score: 17
  • Number of attempts: 1
Mute the second method of this script - 417 entries

prepend a # infront of every line of the second method

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 1
V to the i - 4150 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 4
Whitespace, empty lines and tabs - 2603 entries

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

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 9
Where should I put the Newline? - 808 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 2
Line 'em up! - 276 entries

It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!

  • Best score: 17
  • Best player score: 19
  • Number of attempts: 1
-a-b-c- - 2707 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 4
Basic renumbering - 4854 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 4
Switch function arguments - 1857 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 3
Make it more readable - 1775 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 5
quotes inside quotes - 2844 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: 15
  • Number of attempts: 3
Words in parens - 11439 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 2
Just the middle - 9759 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 1
Remove noise from HTTP log - 620 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 2
Robert Robertson
Twitter:

entered into 18 challenges

contributed 0 challenges