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

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

  • Best score: 12
  • Best player score: 12
  • Position: #139 / 1541
  • Number of attempts: 5
Make it more readable - 1891 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 14
  • Position: #113 / 622
  • Number of attempts: 2
remove dupes from array - 1290 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: #150 / 325
  • Number of attempts: 2
Alphabetize the directory - 269 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 39
  • Position: #71 / 97
  • Number of attempts: 1
PHP Array Syntax -> MailChimp Merge Syntax - 482 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: 37
  • Position: #95 / 143
  • Number of attempts: 1
Case preserving word replacement - 436 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

  • Best score: 19
  • Best player score: 19
  • Position: #30 / 175
  • Number of attempts: 2
Sort entries based on date - 339 entries

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

  • Best score: 11
  • Best player score: 11
  • Position: #7 / 110
  • Number of attempts: 3
Ruby 1.9 hashes - 1157 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: 14
  • Position: #199 / 382
  • Number of attempts: 3
Add fold markers to a .c file - 481 entries

Fold markers can make it easier to navigate source code. Add them to this .c file.

  • Best score: 30
  • Best player score: 57
  • Position: #150 / 157
  • Number of attempts: 2
Simple text editing with Vim - 11624 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #39 / 3410
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 6004 entries

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

  • Best score: 32
  • Best player score: 40
  • Position: #725 / 1480
  • Number of attempts: 4
Travis Jeffery
Twitter:

Programming: Clojure, Haskell, Lisp, Ruby; JS, Obj-C; Math: Topology; Differential Equations; Number Theory, Music: Ableton; Misc: Tea, Design, Apple, Toronto

entered into 11 challenges

contributed 0 challenges