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

Swap values - 4535 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 14
  • Position: #738 / 1255
  • Number of attempts: 1
Separate the lines - 175 entries

Every other line is mixed up. Separate them into their original texts.

  • Best score: 11
  • Best player score: 11
  • Position: #42 / 89
  • Number of attempts: 1
V to the i - 4743 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1324 / 1878
  • Number of attempts: 1
Search and Replace 0 - 4790 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #544 / 1585
  • Number of attempts: 3
Number Sort - 303 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

  • Best score: 9
  • Best player score: 9
  • Position: #83 / 162
  • Number of attempts: 1
comment and uncomment code inline - 1069 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: 12
  • Position: #251 / 314
  • Number of attempts: 1
Just the middle - 11346 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2748 / 4160
  • Number of attempts: 1
Team names - 1805 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 18
  • Position: #372 / 581
  • Number of attempts: 1
Basic renumbering - 5584 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 11
  • Position: #145 / 1257
  • Number of attempts: 1
Fiddle percentages into real numbers - 840 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: 17
  • Position: #216 / 287
  • Number of attempts: 2
comments galore - 998 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 11
  • Position: #361 / 418
  • Number of attempts: 2
Mirrored text - 163 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 15
  • Position: #27 / 69
  • Number of attempts: 1
Generate a list of numbers - 283 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 16
  • Position: #120 / 136
  • Number of attempts: 1
VimGolfNight - 531 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #261 / 342
  • Number of attempts: 1
Happy TvvO - 403 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 12
  • Position: #134 / 200
  • Number of attempts: 1
-a-b-c- - 3170 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #686 / 1127
  • Number of attempts: 1
Split the words - 356 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

  • Best score: 18
  • Best player score: 32
  • Position: #32 / 108
  • Number of attempts: 6
A HAPPY NEW YEAR 2014 ! - 10616 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2342 / 3663
  • Number of attempts: 2
quotes inside quotes - 3124 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 17
  • Position: #919 / 1071
  • Number of attempts: 1
Words in parens - 12850 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 17
  • Position: #2700 / 3944
  • Number of attempts: 1
Delete unwanted lines - 396 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 9
  • Position: #171 / 225
  • Number of attempts: 2
A simple change - 434 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 14
  • Position: #118 / 187
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 400 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 11
  • Position: #148 / 187
  • Number of attempts: 2
The name of the game - 646 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #243 / 354
  • Number of attempts: 1
Remove noise from HTTP log - 693 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 15
  • Position: #122 / 270
  • Number of attempts: 2
A Simple One - 996 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #481 / 641
  • Number of attempts: 1
Reverse Simple Deletion - 832 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #338 / 454
  • Number of attempts: 1
Increment, increment, increment.... - 643 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #342 / 398
  • 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: 17
  • Position: #2426 / 3567
  • Number of attempts: 1
timonegk
Twitter:

entered into 29 challenges

contributed 0 challenges