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

One number per line - 18749 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2072 / 3867
  • Number of attempts: 2
Array propagate - 338 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 40
  • Position: #104 / 119
  • Number of attempts: 1
Search and Replace 0 - 4994 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1105 / 1627
  • Number of attempts: 2
VimGolfNight - 560 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #109 / 347
  • Number of attempts: 1
Going underground.... - 356 entries

Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...

  • Best score: 22
  • Best player score: 32
  • Position: #87 / 128
  • Number of attempts: 2
attr_aligner - 3520 entries

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

  • Best score: 19
  • Best player score: 35
  • Position: #580 / 702
  • Number of attempts: 3
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: 17
  • Position: #746 / 1079
  • Number of attempts: 3
Words in parens - 12939 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #1999 / 3964
  • Number of attempts: 5
abcd > a b c d - 292 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #113 / 223
  • 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: 11
  • Position: #131 / 193
  • Number of attempts: 1
you're stuck on jQuery < 1.7 - 362 entries

replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`

  • Best score: 25
  • Best player score: 33
  • Position: #84 / 113
  • Number of attempts: 2
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: #527 / 755
  • Number of attempts: 1
replacing each line of a block selection - 3001 entries

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

  • Best score: 18
  • Best player score: 24
  • Position: #507 / 778
  • Number of attempts: 1
Switch function arguments - 2139 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 15
  • Position: #549 / 663
  • Number of attempts: 2
Append semicolon after expressions - 1056 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #201 / 419
  • Number of attempts: 2
Remove noise from HTTP log - 717 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
  • Position: #173 / 273
  • Number of attempts: 1
Numbering a List - 1932 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 22
  • Position: #438 / 653
  • Number of attempts: 3
Ruby 1.9 hashes - 1244 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 12
  • Best player score: 16
  • Position: #296 / 406
  • Number of attempts: 2
The Cake is a Lie - 1349 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 11
  • Position: #435 / 528
  • Number of attempts: 1
Make Fancy Header - 1052 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 24
  • Position: #300 / 344
  • Number of attempts: 1
Simple text editing with Vim - 12841 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #2409 / 3704
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 7016 entries

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

  • Best score: 28
  • Best player score: 41
  • Position: #891 / 1718
  • Number of attempts: 1
Mathieu Larouche
Twitter:

entered into 22 challenges

contributed 0 challenges