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

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

  • Best score: 12
  • Best player score: 14
  • Position: #951 / 1631
  • Number of attempts: 6
Just the middle - 11500 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2091 / 4216
  • Number of attempts: 7
Interweave two blocks of text - 661 entries

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

  • Best score: 15
  • Best player score: 17
  • Position: #122 / 215
  • Number of attempts: 2
Basic renumbering - 5685 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 21
  • Position: #866 / 1270
  • Number of attempts: 4
I forgot quotes - 16051 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1635 / 4194
  • Number of attempts: 5
Words in parens - 12969 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 25
  • Position: #3752 / 3970
  • Number of attempts: 1
replacing each line of a block selection - 3005 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 21
  • Position: #343 / 779
  • Number of attempts: 6
constructor - 182 entries

coding a constructor for a simple class

  • Best score: 59
  • Best player score: 139
  • Position: #50 / 60
  • Number of attempts: 1
switch variable - 5085 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #718 / 1750
  • Number of attempts: 7
The meaning - 575 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #89 / 363
  • Number of attempts: 3
Ugly spreadsheet copy/paste to CSV - 1009 entries

convert an ugly spreadsheet copy/paste into a CSV format.

  • Best score: 19
  • Best player score: 51
  • Position: #163 / 193
  • Number of attempts: 1
PHP <--> Java class conversion Part 1 - 254 entries

Convert this tiny php class to adequate java one.

  • Best score: 65
  • Best player score: 113
  • Position: #43 / 63
  • Number of attempts: 2
Make it more readable - 2009 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Position: #371 / 652
  • Number of attempts: 2
Line Zipper - 477 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Position: #168 / 216
  • 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: 38
  • Position: #102 / 150
  • Number of attempts: 5
imports alignment (python) - 700 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 31
  • Position: #158 / 198
  • Number of attempts: 3
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: 35
  • Position: #151 / 166
  • Number of attempts: 3
Reformat long lines - 361 entries

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

  • Best score: 15
  • Best player score: 24
  • Position: #129 / 135
  • Number of attempts: 1
Generate English Alphabets - 498 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Position: #115 / 208
  • Number of attempts: 2
Numbering a List - 1939 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 22
  • Position: #434 / 655
  • Number of attempts: 1
82 bottles of beer on the wall - 313 entries

Take them down. (sorry, only 82 bottles because the problem size is limited!)

  • Best score: 106
  • Best player score: 136
  • Position: #92 / 146
  • Number of attempts: 1
Simple text editing with Vim - 13093 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #979 / 3766
  • Number of attempts: 15
Reformat/Refactor a Golfer Class - 7229 entries

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

  • Best score: 10
  • Best player score: 77
  • Position: #1713 / 1778
  • Number of attempts: 1
Ben Friedland
Twitter:

principal infrastructure engineer @zenefits, formerly @shapesecurity @tivo @clutter @KIXEYE - creator of https://t.co/tpJVDBaWVI and https://t.co/EdtgvQyjHO

entered into 23 challenges

contributed 0 challenges