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

Simple, Practical, and Common - 32962 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 33
  • Position: #5951 / 7276
  • Number of attempts: 1
Extract argument from function - 2218 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 15
  • Position: #413 / 729
  • Number of attempts: 1
Just the middle - 11141 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3176 / 4114
  • Number of attempts: 1
Mute the second method of this script - 439 entries

prepend a # infront of every line of the second method

  • Best score: 9
  • Best player score: 10
  • Position: #161 / 233
  • Number of attempts: 1
Happy TvvO - 392 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 15
  • Position: #186 / 195
  • Number of attempts: 1
learn vim in short time - 219 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #63 / 150
  • Number of attempts: 2
-a-b-c- - 3118 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Position: #762 / 1112
  • Number of attempts: 2
Where should I put the Newline? - 845 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #337 / 422
  • Number of attempts: 1
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 19
  • Position: #3041 / 3919
  • Number of attempts: 1
you're stuck on jQuery < 1.7 - 330 entries

replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`

  • Best score: 25
  • Best player score: 35
  • Position: #89 / 107
  • Number of attempts: 1
PHP Array Syntax -> MailChimp Merge Syntax - 502 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: 53
  • Position: #134 / 144
  • Number of attempts: 1
imports alignment (python) - 648 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 35
  • Position: #169 / 192
  • Number of attempts: 1
Ruby 1.9 compat - 597 entries

Remember when Ruby supported `when <expr> :`? Well, it doesn't in 1.9, so let's make sure we use `then`, without ruining our lovely new hash syntax!

  • Best score: 14
  • Best player score: 17
  • Position: #141 / 226
  • Number of attempts: 2
Reformat a C golf submission - 536 entries

Take this C golf submission (for the "tiny but standards-compliant Hello World program" category, naturally), and turn it into formatted C code.

  • Best score: 22
  • Best player score: 38
  • Position: #148 / 195
  • Number of attempts: 1
Simple text editing with Vim - 11657 entries

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

  • Best score: 13
  • Best player score: 20
  • Position: #2603 / 3418
  • Number of attempts: 1
Martin Liberg
Twitter:

Web developer at iZettle.

entered into 15 challenges

contributed 0 challenges