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

V to the i - 4840 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1003 / 1905
  • Number of attempts: 2
Extract argument from function - 2387 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #438 / 763
  • Number of attempts: 1
Search and Replace 0 - 5075 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #1006 / 1654
  • Number of attempts: 2
That hyphen - 2602 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Position: #429 / 704
  • Number of attempts: 3
Just the middle - 11566 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #159 / 4238
  • Number of attempts: 3
Basic renumbering - 5707 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 21
  • Position: #860 / 1274
  • Number of attempts: 4
camel riding - 796 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 16
  • Position: #102 / 282
  • Number of attempts: 1
Interleave lines - 208 entries

This is some kind of « paste -d'\n' c b a ». There are many ways to achieve this.. just find the shortest!

  • Best score: 17
  • Best player score: 26
  • Position: #25 / 61
  • Number of attempts: 4
Logging with key - 342 entries

Sometimes it is better to log with meaningful key

  • Best score: 21
  • Best player score: 22
  • Position: #28 / 89
  • Number of attempts: 4
Space out the alphabet - 1668 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 19
  • Position: #240 / 448
  • Number of attempts: 2
Not enough Ps - 73 entries

Different type of code

  • Best score: 13
  • Best player score: 13
  • Position: #1 / 37
  • Number of attempts: 1
Fill visual area - 107 entries

Just have fun!

  • Best score: 20
  • Best player score: 31
  • Position: #15 / 39
  • Number of attempts: 2
Fix the XML - 1050 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 21
  • Position: #86 / 291
  • Number of attempts: 3
Shuffled numbers - 253 entries

Each number is paired with the number it should follow. That's enough information to put them in order.

  • Best score: 15
  • Best player score: 16
  • Position: #62 / 97
  • Number of attempts: 1
Mute the second method of this script - 459 entries

prepend a # infront of every line of the second method

  • Best score: 8
  • Best player score: 9
  • Position: #49 / 241
  • Number of attempts: 3
Happy TvvO - 436 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #74 / 208
  • Number of attempts: 2
I forgot quotes - 16156 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1532 / 4213
  • Number of attempts: 5
learn vim in short time - 243 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #68 / 163
  • Number of attempts: 1
-a-b-c- - 3225 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #539 / 1140
  • Number of attempts: 2
Count both ways - 1022 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #212 / 354
  • Number of attempts: 1
Gray area - 749 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 13
  • Position: #167 / 272
  • Number of attempts: 1
Where should I put the Newline? - 886 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #343 / 440
  • Number of attempts: 1
quotes inside quotes - 3185 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 16
  • Position: #613 / 1086
  • Number of attempts: 2
Words in parens - 13014 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1446 / 3981
  • Number of attempts: 3
Compile C - 445 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 23
  • Position: #103 / 145
  • Number of attempts: 4
Simple text editing with Vim - 13467 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 15
  • Position: #2172 / 3864
  • Number of attempts: 6
Mariano Macchi
Twitter:

entered into 26 challenges

contributed 0 challenges