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 - 32962 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: 30
  • Position: #5021 / 7276
  • Number of attempts: 2
One number per line - 18395 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 28
  • Position: #3484 / 3793
  • Number of attempts: 1
V to the i - 4641 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1656 / 1857
  • Number of attempts: 2
Copy three lines - 2801 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 23
  • Position: #512 / 625
  • Number of attempts: 1
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: 16
  • Position: #517 / 729
  • Number of attempts: 3
Search and Replace 0 - 4681 entries

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

  • Best score: 12
  • Best player score: 18
  • Position: #1319 / 1550
  • Number of attempts: 1
Just the middle - 11141 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2389 / 4114
  • Number of attempts: 5
Fiddle percentages into real numbers - 798 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 21
  • Position: #260 / 273
  • Number of attempts: 1
Add to end of each line... kinda - 290 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

  • Best score: 12
  • Best player score: 13
  • Position: #132 / 156
  • Number of attempts: 2
Vice versa - 7536 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Position: #1697 / 2049
  • Number of attempts: 1
comments galore - 970 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 11
  • Position: #348 / 410
  • Number of attempts: 1
Space out the alphabet - 1595 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 22
  • Position: #323 / 434
  • Number of attempts: 2
I forgot quotes - 15748 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2524 / 4116
  • Number of attempts: 2
learn vim in short time - 219 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #96 / 150
  • Number of attempts: 2
-a-b-c- - 3118 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #957 / 1112
  • 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: 15
  • Position: #400 / 572
  • Number of attempts: 2
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2338 / 3919
  • Number of attempts: 1
The name of the game - 629 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #222 / 344
  • Number of attempts: 1
Saving the hashes(#) - 1966 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 29
  • Position: #341 / 467
  • Number of attempts: 2
Alexander Gryson
Twitter:

An idea in the hand is worth 10 in the head.

entered into 19 challenges

contributed 0 challenges