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

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

  • Best score: 13
  • Best player score: 14
  • Position: #318 / 772
  • Number of attempts: 3
That hyphen - 2646 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Position: #408 / 711
  • Number of attempts: 1
Python Hello World! Reformatting - 1048 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: #182 / 398
  • Number of attempts: 3
Condensed Cases - 827 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: #123 / 254
  • Number of attempts: 3
I forgot quotes - 16237 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1460 / 4224
  • Number of attempts: 5
learn vim in short time - 247 entries

so happy to learn vim.because vim is awesome

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

Implementing the methods of a Java Interface

  • Best score: 33
  • Best player score: 49
  • Position: #24 / 30
  • Number of attempts: 2
-a-b-c- - 3241 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #506 / 1146
  • Number of attempts: 1
Count both ways - 1052 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #192 / 361
  • Number of attempts: 2
Change name of a variable - 196 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 / 147
  • Number of attempts: 1
Lisp Condense - 484 entries

Reduce 4 cons selection operations down to one function call.

  • Best score: 13
  • Best player score: 13
  • Position: #31 / 162
  • Number of attempts: 4
Don't know what this is - 2067 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: #402 / 595
  • Number of attempts: 3
Piphilology - 177 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: #43 / 57
  • Number of attempts: 2
Mess in revision history - 1235 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 37
  • Position: #222 / 259
  • Number of attempts: 1
attr_aligner - 3566 entries

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

  • Best score: 19
  • Best player score: 31
  • Position: #427 / 710
  • Number of attempts: 4
Words in parens - 13053 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2182 / 3991
  • 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 - 226 entries

Assign list elements to matrix

  • Best score: 30
  • Best player score: 61
  • Position: #60 / 64
  • Number of attempts: 1
Minimalist Limerick - 539 entries

Reproduce this lovely poem.

  • Best score: 30
  • Best player score: 52
  • Position: #167 / 177
  • Number of attempts: 1
Transposition - 126 entries

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

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

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #146 / 231
  • Number of attempts: 1
Readable Rubyhash - 285 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: #67 / 98
  • Number of attempts: 3
Dehamlizing - 193 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 39
  • Position: #30 / 73
  • Number of attempts: 2
A simple change - 484 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #112 / 199
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 456 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: #185 / 199
  • Number of attempts: 2
The name of the game - 696 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 13
  • Position: #342 / 369
  • Number of attempts: 1
lamb had a little Mary - 659 entries

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

  • Best score: 16
  • Best player score: 38
  • Position: #123 / 179
  • Number of attempts: 1
Let's play some Ivmgolf - 1162 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #273 / 459
  • Number of attempts: 5
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: 26
  • Position: #31 / 116
  • Number of attempts: 3
Switch function arguments - 2229 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #275 / 684
  • Number of attempts: 5
switch variable - 5128 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1167 / 1764
  • 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: 28
  • Position: #70 / 152
  • Number of attempts: 2
HTML to Haml - 905 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 30
  • Position: #57 / 207
  • Number of attempts: 7
expand a list comprehension (python) - 348 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: #60 / 111
  • Number of attempts: 1
The Cake is a Lie - 1418 entries

Correct the capitalization of each word

  • Best score: 8
  • Best player score: 11
  • Position: #453 / 543
  • Number of attempts: 1
Fix the Haiku - 331 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: #70 / 116
  • Number of attempts: 2
Make Fancy Header - 1108 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 17
  • Position: #196 / 356
  • Number of attempts: 2
Reformat some Python - 657 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 39
  • Position: #92 / 247
  • Number of attempts: 5
Reformat a C golf submission - 678 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: #129 / 220
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7681 entries

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

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

entered into 40 challenges

contributed 0 challenges