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 - 33483 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: 33
  • Position: #6046 / 7384
  • Number of attempts: 6
Swap values - 4554 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 12
  • Position: #424 / 1259
  • Number of attempts: 12
One number per line - 18673 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #198 / 3852
  • Number of attempts: 29
V to the i - 4771 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #130 / 1887
  • Number of attempts: 9
Com(m)a Trouble - 3711 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 44
  • Position: #791 / 839
  • Number of attempts: 3
Copy three lines - 2869 entries

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

  • Best score: 13
  • Best player score: 23
  • Position: #518 / 639
  • Number of attempts: 3
That hyphen - 2572 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 11
  • Position: #366 / 698
  • Number of attempts: 15
comment and uncomment code inline - 1074 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: 9
  • Position: #25 / 316
  • Number of attempts: 10
Just the middle - 11380 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #293 / 4174
  • Number of attempts: 16
Team names - 1812 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 16
  • Position: #26 / 585
  • Number of attempts: 7
Todo list specification - 389 entries

The every item on the todo list must be done today. Modify the list to reflect that.

  • Best score: 37
  • Best player score: 37
  • Position: #51 / 178
  • Number of attempts: 8
Missing Library and a Typo - 860 entries

I forgot to add a c library, please add it for me. Also I'm bad at typing so fix my typo too.

  • Best score: 14
  • Best player score: 18
  • Position: #129 / 211
  • Number of attempts: 11
Basic renumbering - 5605 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 23
  • Position: #981 / 1260
  • Number of attempts: 2
Fiddle percentages into real numbers - 841 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: 13
  • Position: #67 / 288
  • Number of attempts: 11
underscore_to_camelCase - 163 entries

Pointy haired boss decided we need to switch to camelCase. Let's get this over with.

  • Best score: 14
  • Best player score: 26
  • Position: #80 / 81
  • Number of attempts: 1
Vice versa - 7865 entries

Little role switching.

  • Best score: 12
  • Best player score: 25
  • Position: #1976 / 2114
  • Number of attempts: 5
Paragraph breaks - 509 entries

Swap the blank lines and the aaa lines.

  • Best score: 10
  • Best player score: 13
  • Position: #105 / 166
  • Number of attempts: 4
Array transposition - 2407 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 20
  • Position: #221 / 445
  • Number of attempts: 9
unknown command - 166 entries

I want change 5 words

  • Best score: 7
  • Best player score: 7
  • Position: #34 / 86
  • Number of attempts: 6
Cartesian product - 222 entries

{1,2,3,4,5} X {1,2,3,4,5}

  • Best score: 24
  • Best player score: 170
  • Position: #93 / 93
  • Number of attempts: 1
Collect List - 4267 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 16
  • Position: #761 / 1188
  • Number of attempts: 6
camel riding - 775 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 16
  • Position: #138 / 277
  • Number of attempts: 8
readability - 315 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 18
  • Position: #13 / 150
  • Number of attempts: 2
Space out the alphabet - 1630 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 17
  • Position: #146 / 442
  • Number of attempts: 8
Fix the XML - 1000 entries

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

  • Best score: 18
  • Best player score: 37
  • Position: #270 / 287
  • Number of attempts: 2
I forgot quotes - 15946 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #142 / 4166
  • Number of attempts: 13
-a-b-c- - 3183 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 37
  • Position: #1124 / 1132
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10652 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 32
  • Position: #3644 / 3677
  • Number of attempts: 2
Words in parens - 12868 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1423 / 3950
  • Number of attempts: 10
Vertical Limit - 2487 entries

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

  • Best score: 21
  • Best player score: 23
  • Position: #244 / 748
  • Number of attempts: 14
Exchanging Quotes - 824 entries

Sometimes you need to exchange a choice of quotes in some code.

  • Best score: 30
  • Best player score: 41
  • Position: #193 / 227
  • Number of attempts: 11
Bruce Park
Twitter:

code, music, wandering...some days not in that order

entered into 31 challenges

contributed 0 challenges