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

Number an outline - 199 entries

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

  • Best score: 25
  • Best player score: 71
  • Number of attempts: 1
Reverse and count - 378 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
  • Number of attempts: 1
Rotating Philosophers Problem - 346 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
  • Number of attempts: 3
remove dupes from array - 1179 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
  • Number of attempts: 2
PHP Array Syntax -> MailChimp Merge Syntax - 408 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
  • Number of attempts: 3
Simple text editing with Vim - 10119 entries

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

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 3
Words in parens - 10615 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 5
paste indent correction - JS - 75 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
  • Number of attempts: 1
Sort entries based on date - 296 entries

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

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 2
Reverse characters in a line - 563 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
  • Number of attempts: 5
Search and Replace 0 - 3916 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
Reverse Simple Deletion - 698 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 1
Whitespace, empty lines and tabs - 2518 entries

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

  • Best score: 16
  • Best player score: 19
  • Number of attempts: 5
Al
Twitter:

entered into 13 challenges

contributed 0 challenges