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

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

  • Best score: 12
  • Best player score: 12
  • Position: #144 / 1616
  • Number of attempts: 3
Number an outline - 279 entries

The indent and words are right, but the numbers are all wrong.

  • Best score: 25
  • Best player score: 71
  • Position: #69 / 77
  • Number of attempts: 1
Words in parens - 12918 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #26 / 3957
  • Number of attempts: 5
paste indent correction - JS - 112 entries

You copy some javascript code from a website and paste it into vim, it does not look good!

  • Best score: 16
  • Best player score: 16
  • Position: #15 / 59
  • Number of attempts: 1
remove dupes from array - 1347 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: 22
  • Position: #158 / 334
  • Number of attempts: 2
PHP Array Syntax -> MailChimp Merge Syntax - 545 entries

I recently needed to send an e-mail to our marketing department listing allowed merge tags for our MailChimp campaigns. The allowed merge tags were determined from a PHP array in one of our PHP classes. I transformed the PHP class to MailChimp's syntax and sent the e-mail. It was, however, a long, laborious process. I'm still fairly new to Vim and would love to see how an expert Vim user would tackle one of my own, real-world problems. Thanks and have fun!

  • Best score: 23
  • Best player score: 27
  • Position: #60 / 150
  • Number of attempts: 3
Sort entries based on date - 392 entries

Sort some entries in a Ledger-file based on date.

  • Best score: 11
  • Best player score: 13
  • Position: #71 / 117
  • Number of attempts: 2
Rotating Philosophers Problem - 410 entries

Can you help the philosophers find a good place to sit before they get five forks and spaghetti?

  • Best score: 29
  • Best player score: 30
  • Position: #66 / 166
  • Number of attempts: 3
Reverse and count - 470 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

  • Best score: 18
  • Best player score: 33
  • Position: #147 / 175
  • Number of attempts: 1
Reverse Simple Deletion - 845 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 14
  • Position: #392 / 457
  • Number of attempts: 1
Reverse characters in a line - 750 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 13
  • Position: #40 / 261
  • Number of attempts: 5
Whitespace, empty lines and tabs - 3577 entries

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

  • Best score: 16
  • Best player score: 19
  • Position: #197 / 773
  • Number of attempts: 5
Simple text editing with Vim - 12632 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #41 / 3655
  • Number of attempts: 3
Al
Twitter:

entered into 13 challenges

contributed 0 challenges