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

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

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

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 14
  • Position: #117 / 640
  • Number of attempts: 2
remove dupes from array - 1336 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: #153 / 331
  • Number of attempts: 2
Alphabetize the directory - 283 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 39
  • Position: #73 / 99
  • Number of attempts: 1
PHP Array Syntax -> MailChimp Merge Syntax - 507 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: #96 / 148
  • Number of attempts: 1
Case preserving word replacement - 453 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 / 179
  • Number of attempts: 2
Sort entries based on date - 363 entries

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

  • Best score: 11
  • Best player score: 11
  • Position: #7 / 114
  • Number of attempts: 3
Ruby 1.9 hashes - 1221 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: #207 / 401
  • Number of attempts: 3
Add fold markers to a .c file - 556 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: #165 / 172
  • Number of attempts: 2
Simple text editing with Vim - 12290 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 / 3581
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 6558 entries

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

  • Best score: 32
  • Best player score: 40
  • Position: #759 / 1615
  • 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