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

vim = 22 / 7 - 493 entries

pi square vim

  • Best score: 20
  • Best player score: 20
  • Position: #26 / 137
  • Number of attempts: 6
V to the i - 4890 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 7
  • Position: #88 / 1917
  • Number of attempts: 3
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: 13
  • Position: #91 / 774
  • Number of attempts: 3
Search and Replace 0 - 5170 entries

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

  • Best score: 7
  • Best player score: 12
  • Position: #353 / 1680
  • Number of attempts: 5
That hyphen - 2650 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #23 / 713
  • Number of attempts: 4
Just the middle - 11636 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #64 / 4262
  • Number of attempts: 2
VimGolfNight - 604 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #197 / 357
  • Number of attempts: 1
camel riding - 817 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 16
  • Position: #87 / 285
  • Number of attempts: 3
Happy TvvO - 443 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #30 / 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: #28 / 168
  • Number of attempts: 1
-a-b-c- - 3243 entries

Put hyphens everywhere.

  • Best score: 6
  • Best player score: 13
  • Position: #30 / 1148
  • Number of attempts: 2
Gray area - 765 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 12
  • Position: #44 / 277
  • Number of attempts: 3
Winding path - 144 entries

It's a maze, but the bad paths have been blocked off. Mark the correct path.

  • Best score: 27
  • Best player score: 27
  • Position: #5 / 44
  • Number of attempts: 4
Don't know what this is - 2070 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: 11
  • Position: #23 / 596
  • Number of attempts: 5
Where should I put the Newline? - 916 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Position: #111 / 453
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10757 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #476 / 3717
  • Number of attempts: 4
attr_aligner - 3569 entries

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

  • Best score: 7
  • Best player score: 19
  • Position: #80 / 712
  • Number of attempts: 11
Letter case trickery - 1688 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 10
  • Position: #120 / 526
  • Number of attempts: 3
Words in parens - 13063 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #453 / 3995
  • Number of attempts: 3
Pairs of numbers - 388 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: 27
  • Position: #30 / 139
  • Number of attempts: 6
abcd > a b c d - 310 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #144 / 232
  • Number of attempts: 1
A simple change - 486 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #24 / 200
  • Number of attempts: 2
The name of the game - 707 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #179 / 374
  • Number of attempts: 1
replacing each line of a block selection - 3070 entries

replace each line's ../assets/js with /javascripts

  • Best score: 7
  • Best player score: 18
  • Position: #70 / 791
  • Number of attempts: 5
Switch function arguments - 2235 entries

How to switch two arguments of a function.

  • Best score: 7
  • Best player score: 11
  • Position: #106 / 687
  • Number of attempts: 4
Append semicolon after expressions - 1088 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #79 / 427
  • Number of attempts: 1
switch variable - 5136 entries

how fast can you switch two variable ?

  • Best score: 9
  • Best player score: 11
  • Position: #330 / 1767
  • Number of attempts: 3
The meaning - 589 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #241 / 369
  • Number of attempts: 1
Make it more readable - 2041 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Position: #61 / 659
  • Number of attempts: 3
remove dupes from array - 1379 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 17
  • Position: #61 / 342
  • Number of attempts: 8
Shebangs for all - 2105 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 12
  • Position: #147 / 534
  • Number of attempts: 5
A Simple One - 1096 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: #392 / 683
  • Number of attempts: 1
Reverse Simple Deletion - 875 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Position: #24 / 467
  • Number of attempts: 2
Increment, increment, increment.... - 712 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #299 / 420
  • Number of attempts: 1
Reverse characters in a line - 848 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 8
  • Best player score: 12
  • Position: #8 / 285
  • Number of attempts: 4
Change the content of a string - 1810 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #145 / 659
  • Number of attempts: 4
Sort and add attributes - 1605 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Position: #184 / 622
  • 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: 13
  • Position: #296 / 3920
  • Number of attempts: 2
Johannes H.
Twitter:

entered into 38 challenges

contributed 0 challenges