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

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

  • Best score: 13
  • Best player score: 13
  • Position: #22 / 729
  • Number of attempts: 3
Search and Replace 0 - 4681 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #298 / 1550
  • Number of attempts: 2
Across-Down Flip - 45 entries

Do this instead of the Sunday crossword.

  • Best score: 23
  • Best player score: 29
  • Position: #12 / 23
  • Number of attempts: 2
Just the middle - 11141 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #351 / 4114
  • Number of attempts: 2
Cartesian product - 217 entries

{1,2,3,4,5} X {1,2,3,4,5}

  • Best score: 24
  • Best player score: 32
  • Position: #46 / 91
  • Number of attempts: 1
Collect List - 4184 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 16
  • Position: #740 / 1167
  • Number of attempts: 2
VimGolfNight - 505 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #158 / 330
  • Number of attempts: 1
Change name of a variable - 163 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: #29 / 127
  • Number of attempts: 1
Don't know what this is - 1951 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: 12
  • Position: #147 / 572
  • Number of attempts: 4
Two become one - 703 entries

We have two c arrays and want to make one two dimensional out of it. Can we do that?

  • Best score: 25
  • Best player score: 31
  • Position: #96 / 202
  • Number of attempts: 1
Vim tetris - 351 entries

Vim can play tetris too!

  • Best score: 21
  • Best player score: 23
  • Position: #30 / 100
  • Number of attempts: 4
Mess in revision history - 1143 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 18
  • Position: #72 / 242
  • Number of attempts: 4
Split the words - 353 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

  • Best score: 18
  • Best player score: 36
  • Position: #44 / 106
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10538 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #50 / 3638
  • Number of attempts: 4
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #126 / 3919
  • Number of attempts: 4
Hole-in-one - 978 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 22
  • Position: #228 / 298
  • Number of attempts: 2
NATO phonetic alphabet - 479 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 19
  • Position: #18 / 182
  • Number of attempts: 3
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: 34
  • Position: #85 / 107
  • Number of attempts: 1
Switch function arguments - 1985 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #91 / 628
  • Number of attempts: 4
Append semicolon after expressions - 958 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #56 / 388
  • Number of attempts: 3
switch variable - 4945 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #272 / 1708
  • Number of attempts: 3
The meaning - 523 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #218 / 338
  • Number of attempts: 1
A Simple One - 934 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #367 / 617
  • Number of attempts: 1
Increment, increment, increment.... - 591 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #258 / 378
  • Number of attempts: 1
Almost encrypted - 182 entries

Convert the first paragraph to be even less readable.

  • Best score: 5
  • Best player score: 5
  • Position: #103 / 137
  • Number of attempts: 1
Make Fancy Header - 978 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 16
  • Position: #83 / 329
  • Number of attempts: 3
Braces or Brackets? - 713 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 57
  • Position: #229 / 253
  • Number of attempts: 1
Milind Ganjoo
Twitter:

Software engineer. Meticulous suitcase packer. Lover of anagrams.

entered into 27 challenges

contributed 0 challenges