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

Extract argument from function - 2397 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #316 / 766
  • Number of attempts: 3
That hyphen - 2624 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Position: #406 / 708
  • Number of attempts: 1
Python Hello World! Reformatting - 1015 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 43
  • Position: #178 / 390
  • Number of attempts: 3
Condensed Cases - 820 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 14
  • Position: #122 / 251
  • Number of attempts: 3
I forgot quotes - 16176 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1457 / 4216
  • Number of attempts: 5
learn vim in short time - 245 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #43 / 165
  • Number of attempts: 2
Replace Parameter with Explicit Methods - 94 entries

Implementing the methods of a Java Interface

  • Best score: 33
  • Best player score: 49
  • Position: #23 / 29
  • Number of attempts: 2
-a-b-c- - 3233 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #504 / 1143
  • Number of attempts: 1
Count both ways - 1030 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #189 / 356
  • Number of attempts: 2
Change name of a variable - 182 entries

Replace the name of the $variable with the fastest move possible. The challenge is having a command that allow you to easily change the variable name even if its indented.

  • Best score: 9
  • Best player score: 9
  • Position: #81 / 140
  • Number of attempts: 1
Lisp Condense - 472 entries

Reduce 4 cons selection operations down to one function call.

  • Best score: 13
  • Best player score: 13
  • Position: #31 / 159
  • Number of attempts: 4
Don't know what this is - 2040 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 15
  • Position: #397 / 590
  • Number of attempts: 3
Piphilology - 174 entries

Piphilology comprises the creation and use of mnemonic techniques to remember a span of digits of the mathematical constant π. http://en.wikipedia.org/wiki/Piphilology

  • Best score: 28
  • Best player score: 38
  • Position: #41 / 55
  • Number of attempts: 2
Mess in revision history - 1228 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 37
  • Position: #221 / 256
  • Number of attempts: 1
attr_aligner - 3565 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 31
  • Position: #426 / 709
  • Number of attempts: 4
Words in parens - 13024 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2177 / 3983
  • Number of attempts: 2
Pairs of numbers - 387 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

  • Best score: 26
  • Best player score: 37
  • Position: #75 / 138
  • Number of attempts: 2
Assign list - 202 entries

Assign list elements to matrix

  • Best score: 30
  • Best player score: 61
  • Position: #59 / 63
  • Number of attempts: 1
Minimalist Limerick - 520 entries

Reproduce this lovely poem.

  • Best score: 30
  • Best player score: 52
  • Position: #166 / 174
  • Number of attempts: 1
Transposition - 99 entries

Transpose the original lines in separate columns, one for each line.

  • Best score: 31
  • Best player score: 81
  • Position: #29 / 32
  • Number of attempts: 2
abcd > a b c d - 299 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #146 / 228
  • Number of attempts: 1
Readable Rubyhash - 274 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: 23
  • Best player score: 29
  • Position: #66 / 97
  • Number of attempts: 3
Dehamlizing - 185 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 39
  • Position: #29 / 72
  • Number of attempts: 2
A simple change - 476 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 14
  • Position: #110 / 196
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 438 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 13
  • Position: #182 / 196
  • Number of attempts: 2
The name of the game - 679 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 13
  • Position: #337 / 364
  • Number of attempts: 1
lamb had a little Mary - 641 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 38
  • Position: #122 / 177
  • Number of attempts: 1
Let's play some Ivmgolf - 1145 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #270 / 454
  • Number of attempts: 5
you're stuck on jQuery < 1.7 - 364 entries

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

  • Best score: 25
  • Best player score: 26
  • Position: #30 / 114
  • Number of attempts: 3
Switch function arguments - 2195 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #274 / 678
  • Number of attempts: 5
switch variable - 5110 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1164 / 1758
  • Number of attempts: 1
PHP Array Syntax -> MailChimp Merge Syntax - 550 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: 28
  • Position: #69 / 151
  • Number of attempts: 2
HTML to Haml - 883 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 30
  • Position: #56 / 206
  • Number of attempts: 7
expand a list comprehension (python) - 334 entries

Please show your way to convert a list comprehension in python to an ordinary for-loop expression!

  • Best score: 42
  • Best player score: 54
  • Position: #59 / 110
  • Number of attempts: 1
The Cake is a Lie - 1390 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 11
  • Position: #450 / 539
  • Number of attempts: 1
Fix the Haiku - 320 entries

Change this slightly scrambled haiku to its unscrambled form and fix the capitalisation and punctuation along the way.

  • Best score: 28
  • Best player score: 42
  • Position: #69 / 115
  • Number of attempts: 2
Make Fancy Header - 1080 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 17
  • Position: #193 / 352
  • Number of attempts: 2
Reformat some Python - 637 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 39
  • Position: #90 / 243
  • Number of attempts: 5
Reformat a C golf submission - 631 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: 33
  • Position: #126 / 215
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7579 entries

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

  • Best score: 7
  • Best player score: 35
  • Position: #386 / 1871
  • Number of attempts: 5
Mauro Persano
Twitter:

entered into 40 challenges

contributed 0 challenges