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 - 32741 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 / 7234
  • Number of attempts: 3
One number per line - 18223 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 16
  • Position: #910 / 3759
  • Number of attempts: 4
V to the i - 4596 entries

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

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

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

  • Best score: 12
  • Best player score: 13
  • Position: #139 / 803
  • Number of attempts: 4
Add semicolons - 10429 entries

Simply add a semicolon at the end of each line

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

Create a box around a line.

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

AaAaAaA

  • Best score: 7
  • Best player score: 16
  • Position: #377 / 677
  • Number of attempts: 2
Copy three lines - 2751 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #250 / 616
  • Number of attempts: 4
Search and Replace 0 - 4534 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #781 / 1507
  • Number of attempts: 2
Just the middle - 11074 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2384 / 4088
  • Number of attempts: 2
Make HTML List - 982 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 39
  • Position: #81 / 259
  • Number of attempts: 2
Format java properties - 64 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: #20 / 29
  • Number of attempts: 2
Basic renumbering - 5393 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 18
  • Position: #649 / 1218
  • Number of attempts: 3
Combines all items - 263 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #108 / 120
  • Number of attempts: 1
C Reformatting - 675 entries

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

  • Best score: 30
  • Best player score: 56
  • Position: #104 / 156
  • Number of attempts: 2
Order and join - 846 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 13
  • Position: #163 / 233
  • Number of attempts: 3
Scrambled numbers - 769 entries

Four is NOT 1. One is 1.

  • Best score: 18
  • Best player score: 23
  • Position: #95 / 178
  • Number of attempts: 4
Collect List - 4146 entries

Convert to comma separated list.

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

add a prefix on some camelCase variables

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

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 18
  • Position: #215 / 421
  • Number of attempts: 1
Conway sequence - 22 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 / 17
  • Number of attempts: 1
-a-b-c- - 3077 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #949 / 1099
  • Number of attempts: 1
Count both ways - 932 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #250 / 333
  • Number of attempts: 2
Do you demand a shrubbery? - 1081 entries

Use :redir and crush the emacsgolfers.

  • Best score: 8
  • Best player score: 15
  • Position: #60 / 286
  • Number of attempts: 3
Saving the hashes(#) - 1929 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: #338 / 461
  • Number of attempts: 1
Simple text editing with Vim - 11354 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1507 / 3335
  • 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