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

Make HTML List - 855 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 55
  • Number of attempts: 1
Two become one - 660 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: 28
  • Number of attempts: 3
Saving the hashes(#) - 1696 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: 25
  • Number of attempts: 4
Array propagate - 226 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 36
  • Number of attempts: 1
Wrap text in quotes - 279 entries

All the blocks of text should be wrapped in quotation marks.

  • Best score: 16
  • Best player score: 23
  • Number of attempts: 2
Unwrap the text of an email message - 135 entries

Reverse of "Wrap the text of an email message to 79 characters". gq and gw are great for wrapping paragraphs. But sometimes other programs choke on your wrapped lines. What's the best way to un-gq?

  • Best score: 16
  • Best player score: 26
  • Number of attempts: 2
Align commas - 782 entries

There are 15,000 aligning challenges on vimgolf.com, and they're all exactly the same. I hope this one is a little different.

  • Best score: 11
  • Best player score: 19
  • Number of attempts: 3
Adam's challenge - 712 entries

Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.

  • Best score: 18
  • Best player score: 23
  • Number of attempts: 4
Swap values inside brackets - 1242 entries

Easy challenge.

  • Best score: 2
  • Best player score: 17
  • Number of attempts: 4
Vertical Limit - 2070 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 3
comments galore - 886 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 5
Just the middle - 8843 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
Simple addition - 223 entries

The right side of the equation is already there. We just need the left one now.

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 4
Letter case trickery - 1424 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: 12
  • Number of attempts: 2
comment and uncomment code inline - 731 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 5
The Universal Declaration of Human Rights, Article 1 - 128 entries

Somebody's got this slightly muddled up. See how quickly you can fix it. (I made this to experiment with buffers. I'm not actually sure whether this is faster with buffers or without.)

  • Best score: 24
  • Best player score: 24
  • Number of attempts: 2
Remember VimGolf Rules ! - 187 entries

Rules, ... and don't forget !

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
From A to B - 487 entries

Mirror and change this text block

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 5
Switch function arguments - 1801 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 4
switch variable - 4212 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 13
  • Number of attempts: 2
I forgot quotes - 11130 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Number of attempts: 7
chaotic
Twitter:

entered into 21 challenges

contributed 0 challenges