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 - 34031 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: #6127 / 7520
  • Number of attempts: 1
Extract argument from function - 2430 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #442 / 774
  • Number of attempts: 1
Just the middle - 11636 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3285 / 4262
  • Number of attempts: 1
Mute the second method of this script - 466 entries

prepend a # infront of every line of the second method

  • Best score: 8
  • Best player score: 10
  • Position: #170 / 247
  • Number of attempts: 1
Happy TvvO - 443 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #204 / 213
  • Number of attempts: 1
learn vim in short time - 248 entries

so happy to learn vim.because vim is awesome

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

Put hyphens everywhere.

  • Best score: 6
  • Best player score: 16
  • Position: #791 / 1148
  • Number of attempts: 2
Where should I put the Newline? - 916 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #349 / 453
  • Number of attempts: 1
Words in parens - 13063 entries

We should all ace this, right?

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

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

  • Best score: 25
  • Best player score: 35
  • Position: #96 / 116
  • Number of attempts: 1
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: 53
  • Position: #140 / 152
  • Number of attempts: 1
imports alignment (python) - 729 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 35
  • Position: #179 / 205
  • Number of attempts: 1
Ruby 1.9 compat - 670 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: #158 / 245
  • Number of attempts: 2
Reformat a C golf submission - 682 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: #171 / 223
  • Number of attempts: 1
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: 20
  • Position: #2948 / 3920
  • Number of attempts: 1
Martin Liberg
Twitter:

Web developer at iZettle.

entered into 15 challenges

contributed 0 challenges