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

Simple, Practical, and Common - 32904 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 23
  • Position: #2360 / 7270
  • Number of attempts: 4
Extract argument from function - 2215 entries

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

  • Best score: 13
  • Best player score: 15
  • Position: #383 / 728
  • Number of attempts: 1
Search and Replace 0 - 4651 entries

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

  • Best score: 12
  • Best player score: 18
  • Position: #1271 / 1541
  • Number of attempts: 1
Swap assigned value - 556 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 12
  • Position: #192 / 235
  • Number of attempts: 4
ASCII box - 317 entries

Don't forget to fix typos!

  • Best score: 23
  • Best player score: 27
  • Position: #59 / 102
  • Number of attempts: 2
Mute the second method of this script - 439 entries

prepend a # infront of every line of the second method

  • Best score: 9
  • Best player score: 9
  • Position: #12 / 233
  • Number of attempts: 1
Where should I put the Newline? - 842 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #234 / 421
  • Number of attempts: 1
HTML formatting: vertical alignment for readability - 60 entries

We did this a VimGolf challenge at work and now that we have finished I want to see if you guys can come up with something even better than we could. Our best solution was 44 keystrokes.

  • Best score: 33
  • Best player score: 61
  • Position: #21 / 32
  • Number of attempts: 1
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2059 / 3919
  • Number of attempts: 2
Minimalist Limerick - 503 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 38
  • Position: #115 / 167
  • Number of attempts: 2
abcd > a b c d - 260 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #130 / 204
  • Number of attempts: 1
The name of the game - 627 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #168 / 343
  • Number of attempts: 1
Let's play some Ivmgolf - 1004 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #236 / 417
  • Number of attempts: 2
Switch function arguments - 1982 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #245 / 627
  • Number of attempts: 3
Remove noise from HTTP log - 660 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 18
  • Position: #231 / 260
  • Number of attempts: 1
switch variable - 4917 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1315 / 1701
  • Number of attempts: 1
The meaning - 521 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #226 / 336
  • Number of attempts: 1
Context insensitive completion 0 - 468 entries

Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.

  • Best score: 7
  • Best player score: 8
  • Position: #125 / 221
  • Number of attempts: 3
Reformat a C golf submission - 522 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: 28
  • Position: #56 / 193
  • Number of attempts: 3
Change the content of a string - 1346 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #323 / 520
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6004 entries

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

  • Best score: 32
  • Best player score: 68
  • Position: #1421 / 1480
  • Number of attempts: 1
ryk
Twitter:

Mediocrity as a service

entered into 21 challenges

contributed 0 challenges