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 - 33354 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: 22
  • Position: #1324 / 7358
  • Number of attempts: 3
One number per line - 18615 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 16
  • Position: #947 / 3841
  • Number of attempts: 4
V to the i - 4743 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #481 / 1878
  • Number of attempts: 3
Applying same text modification in several lines - 2845 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 13
  • Position: #157 / 840
  • Number of attempts: 4
Add semicolons - 10785 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #14 / 3042
  • Number of attempts: 7
Box it - 7818 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 21
  • Position: #107 / 1861
  • Number of attempts: 4
Every other line - 2886 entries

AaAaAaA

  • Best score: 12
  • Best player score: 16
  • Position: #390 / 700
  • Number of attempts: 2
Copy three lines - 2839 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #258 / 634
  • Number of attempts: 4
Search and Replace 0 - 4790 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #831 / 1585
  • Number of attempts: 2
Just the middle - 11346 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2416 / 4160
  • Number of attempts: 2
Make HTML List - 1039 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 39
  • Position: #84 / 271
  • Number of attempts: 2
Format java properties - 72 entries

Format java properties to a different format. The value which is the string following the first '=' cannot & should not change. All periods in the key get replaced with an underscore "_" and get a prefix of "b_".

  • Best score: 27
  • Best player score: 36
  • Position: #23 / 33
  • Number of attempts: 2
Basic renumbering - 5584 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 18
  • Position: #676 / 1257
  • Number of attempts: 3
Combines all items - 303 entries

For each line that starts with the same number I want to combine its contents

  • Best score: 9
  • Best player score: 10
  • Position: #116 / 137
  • Number of attempts: 1
C Reformatting - 688 entries

You may use Visual mode... or not. #uppercase

  • Best score: 30
  • Best player score: 56
  • Position: #107 / 161
  • Number of attempts: 2
Order and join - 948 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 13
  • Position: #180 / 254
  • Number of attempts: 3
Scrambled numbers - 779 entries

Four is NOT 1. One is 1.

  • Best score: 18
  • Best player score: 23
  • Position: #96 / 182
  • Number of attempts: 4
Collect List - 4261 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #303 / 1185
  • Number of attempts: 3
camel riding - 769 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 15
  • Position: #58 / 274
  • Number of attempts: 3
Space out the alphabet - 1627 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 18
  • Position: #224 / 440
  • Number of attempts: 1
Conway sequence - 23 entries

Generate the the first fifteen numbers. See here for more information: http://en.wikipedia.org/wiki/Look-and-say_sequence

  • Best score: 43
  • Best player score: 43
  • Position: #13 / 18
  • Number of attempts: 1
-a-b-c- - 3170 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #973 / 1127
  • Number of attempts: 1
Count both ways - 997 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #261 / 350
  • Number of attempts: 2
Do you demand a shrubbery? - 1120 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 15
  • Position: #59 / 293
  • Number of attempts: 3
Saving the hashes(#) - 1992 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: #345 / 473
  • Number of attempts: 1
Simple text editing with Vim - 12233 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1555 / 3567
  • Number of attempts: 2
Jerry Wu
Twitter:

People are like snowflakes: Piles of them on the road make it hard to drive.

entered into 26 challenges

contributed 0 challenges