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

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

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

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

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

Do this instead of the Sunday crossword.

  • Best score: 23
  • Best player score: 29
  • Position: #13 / 24
  • Number of attempts: 2
Just the middle - 11346 entries

Delete the instructions at the top and bottom.

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

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

  • Best score: 24
  • Best player score: 32
  • Position: #47 / 92
  • Number of attempts: 1
Collect List - 4261 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 16
  • Position: #752 / 1185
  • Number of attempts: 2
VimGolfNight - 531 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #158 / 342
  • Number of attempts: 1
Change name of a variable - 169 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 / 132
  • Number of attempts: 1
Don't know what this is - 1978 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: #150 / 578
  • Number of attempts: 4
Two become one - 710 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: #97 / 205
  • Number of attempts: 1
Vim tetris - 352 entries

Vim can play tetris too!

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

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 18
  • Position: #73 / 245
  • Number of attempts: 4
Split the words - 356 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 / 108
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10616 entries

A HAPPY NEW YEAR 2014 !

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

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #135 / 3944
  • Number of attempts: 4
Hole-in-one - 1012 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: #232 / 302
  • Number of attempts: 2
NATO phonetic alphabet - 498 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 19
  • Position: #18 / 189
  • Number of attempts: 3
you're stuck on jQuery < 1.7 - 335 entries

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

  • Best score: 25
  • Best player score: 34
  • Position: #87 / 110
  • Number of attempts: 1
Switch function arguments - 2064 entries

How to switch two arguments of a function.

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

Some lines need the semicolon, some don't.

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

how fast can you switch two variable ?

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

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #218 / 355
  • Number of attempts: 1
A Simple One - 996 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 / 641
  • Number of attempts: 1
Increment, increment, increment.... - 643 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #271 / 398
  • Number of attempts: 1
Almost encrypted - 198 entries

Convert the first paragraph to be even less readable.

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

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 16
  • Position: #83 / 337
  • Number of attempts: 3
Braces or Brackets? - 870 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: #257 / 284
  • Number of attempts: 1
Milind Ganjoo
Twitter:

Software engineer. Meticulous suitcase packer. Lover of anagrams.

entered into 27 challenges

contributed 0 challenges