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

Sort the cardinal numbers - 330 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 14
  • Position: #106 / 152
  • Number of attempts: 1
Make it more readable - 2041 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 17
  • Position: #428 / 659
  • Number of attempts: 1
Line Zipper - 481 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 14
  • Position: #78 / 218
  • Number of attempts: 3
remove dupes from array - 1379 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: 17
  • Position: #9 / 342
  • Number of attempts: 6
PHP Array Syntax -> MailChimp Merge Syntax - 569 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: 25
  • Position: #53 / 152
  • Number of attempts: 4
Sort entries based on date - 432 entries

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

  • Best score: 11
  • Best player score: 11
  • Position: #15 / 121
  • Number of attempts: 5
Whitespace, empty lines and tabs - 4083 entries

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

  • Best score: 7
  • Best player score: 22
  • Position: #317 / 872
  • Number of attempts: 6
Simple text editing with Vim - 13682 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #951 / 3920
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 7737 entries

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

  • Best score: 7
  • Best player score: 36
  • Position: #464 / 1901
  • Number of attempts: 6
0x5042
Twitter:

entered into 9 challenges

contributed 0 challenges