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 - 33717 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: 24
  • Position: #2828 / 7441
  • Number of attempts: 7
One number per line - 18751 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1571 / 3869
  • Number of attempts: 5
V to the i - 4813 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1557 / 1897
  • Number of attempts: 1
Split line with dots - 2154 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #290 / 635
  • Number of attempts: 2
Search and Replace 0 - 5004 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #876 / 1630
  • Number of attempts: 6
That hyphen - 2595 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #499 / 701
  • Number of attempts: 1
Just the middle - 11479 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1578 / 4207
  • Number of attempts: 4
Make HTML List - 1061 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 47
  • Position: #148 / 274
  • Number of attempts: 2
Interweave two blocks of text - 661 entries

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

  • Best score: 15
  • Best player score: 18
  • Position: #143 / 215
  • Number of attempts: 1
Basic renumbering - 5675 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 26
  • Position: #1168 / 1268
  • Number of attempts: 1
Vice versa - 7942 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Position: #1729 / 2137
  • Number of attempts: 1
C Reformatting - 690 entries

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

  • Best score: 30
  • Best player score: 59
  • Position: #117 / 163
  • Number of attempts: 1
Mirror Symmetry - 822 entries

Add backslashes.

  • Best score: 7
  • Best player score: 12
  • Position: #133 / 269
  • Number of attempts: 2
Simple format (2) - 335 entries

try again!

  • Best score: 23
  • Best player score: 37
  • Position: #56 / 70
  • Number of attempts: 1
Merge blank lines and properly capitalize - 82 entries

Here you need complete 2 tasks: 1. Remove all unwanted continuous blank lines and leave only 1 blank line between paragraphs. 2. Properly capitalize the sentences.

  • Best score: 21
  • Best player score: 67
  • Position: #24 / 24
  • Number of attempts: 1
Fix the XML - 1039 entries

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

  • Best score: 18
  • Best player score: 29
  • Position: #237 / 290
  • Number of attempts: 1
Happy TvvO - 427 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #159 / 206
  • Number of attempts: 2
I forgot quotes - 16014 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2419 / 4188
  • Number of attempts: 1
Gray area - 747 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 14
  • Position: #210 / 271
  • Number of attempts: 2
Do you demand a shrubbery? - 1158 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 18
  • Position: #140 / 300
  • Number of attempts: 3
Don't know what this is - 2024 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 16
  • Position: #477 / 586
  • Number of attempts: 1
Mess in revision history - 1184 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 27
  • Position: #164 / 250
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10679 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #571 / 3688
  • Number of attempts: 3
Letter case trickery - 1630 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: 14
  • Position: #437 / 518
  • Number of attempts: 1
Words in parens - 12966 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 19
  • Position: #3076 / 3968
  • Number of attempts: 1
Harder than "abcd > a b c d" - 104 entries

Not as easy as the last challenge. This time, just one space between a and b, up to 25 spaces between y and z. (Removed some lines; diff was too long.)

  • Best score: 15
  • Best player score: 23
  • Position: #26 / 46
  • Number of attempts: 1
abcd > a b c d - 297 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #78 / 226
  • Number of attempts: 1
Extract text from xml - 127 entries

Extract text from xml file (ignoring commented out elements) and create a one line regex.

  • Best score: 28
  • Best player score: 38
  • Position: #24 / 46
  • Number of attempts: 1
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 16
  • Position: #1579 / 1749
  • Number of attempts: 1
remove dupes from array - 1358 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 22
  • Position: #158 / 336
  • Number of attempts: 2
expand a list comprehension (python) - 334 entries

Please show your way to convert a list comprehension in python to an ordinary for-loop expression!

  • Best score: 42
  • Best player score: 53
  • Position: #53 / 110
  • Number of attempts: 1
Reformat long lines - 361 entries

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

  • Best score: 15
  • Best player score: 21
  • Position: #96 / 135
  • Number of attempts: 3
Generate English Alphabets - 487 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Position: #93 / 206
  • Number of attempts: 1
Numbering a List - 1935 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Position: #358 / 654
  • Number of attempts: 1
Solve the Sokoban - 177 entries

A wink for all Vimgolfers that play Nethack too.

  • Best score: 25
  • Best player score: 31
  • Position: #45 / 74
  • Number of attempts: 1
The holy-grail may help - 372 entries

Can you find it in less than 20 strokes, Arthur?

  • Best score: 16
  • Best player score: 17
  • Position: #173 / 211
  • Number of attempts: 1
A Simple One - 1057 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: #165 / 667
  • Number of attempts: 1
Reverse Simple Deletion - 854 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #178 / 460
  • Number of attempts: 1
Remove Accent off the Letter - 137 entries

Remove all the accent from extremely accented statements.

  • Best score: 37
  • Best player score: 67
  • Position: #35 / 52
  • Number of attempts: 1
Flodder-challenge - 1323 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 36
  • Position: #177 / 344
  • Number of attempts: 1
Simple text editing with Vim - 12955 entries

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

  • Best score: 13
  • Best player score: 23
  • Position: #3016 / 3730
  • Number of attempts: 2
Tact Overflow
Twitter:

The muppet at heartspring's centre.

entered into 41 challenges

contributed 0 challenges