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 - 32745 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: #2746 / 7235
  • Number of attempts: 7
One number per line - 18223 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1514 / 3759
  • Number of attempts: 5
V to the i - 4596 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1507 / 1837
  • Number of attempts: 1
Split line with dots - 2075 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #286 / 616
  • Number of attempts: 2
Search and Replace 0 - 4534 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #797 / 1507
  • Number of attempts: 6
That hyphen - 2464 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #479 / 674
  • Number of attempts: 1
Just the middle - 11074 entries

Delete the instructions at the top and bottom.

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

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 47
  • Position: #139 / 259
  • Number of attempts: 2
Interweave two blocks of text - 530 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: #131 / 196
  • Number of attempts: 1
Basic renumbering - 5393 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 26
  • Position: #1121 / 1218
  • Number of attempts: 1
Vice versa - 7413 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Position: #1639 / 2010
  • Number of attempts: 1
C Reformatting - 675 entries

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

  • Best score: 30
  • Best player score: 59
  • Position: #113 / 156
  • Number of attempts: 1
Mirror Symmetry - 746 entries

Add backslashes.

  • Best score: 7
  • Best player score: 12
  • Position: #122 / 256
  • Number of attempts: 2
Simple format (2) - 296 entries

try again!

  • Best score: 23
  • Best player score: 37
  • Position: #49 / 63
  • Number of attempts: 1
Merge blank lines and properly capitalize - 41 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: #17 / 17
  • Number of attempts: 1
Fix the XML - 934 entries

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

  • Best score: 18
  • Best player score: 29
  • Position: #223 / 273
  • Number of attempts: 1
Happy TvvO - 377 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #147 / 188
  • Number of attempts: 2
I forgot quotes - 15636 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2347 / 4094
  • Number of attempts: 1
Gray area - 674 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 14
  • Position: #195 / 252
  • Number of attempts: 2
Do you demand a shrubbery? - 1081 entries

Use :redir and crush the emacsgolfers.

  • Best score: 8
  • Best player score: 18
  • Position: #138 / 286
  • Number of attempts: 3
Don't know what this is - 1913 entries

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

  • Best score: 3
  • Best player score: 16
  • Position: #459 / 563
  • Number of attempts: 1
Mess in revision history - 1117 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 27
  • Position: #156 / 239
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10507 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #571 / 3626
  • Number of attempts: 3
Letter case trickery - 1515 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: #416 / 492
  • Number of attempts: 1
Words in parens - 12677 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 19
  • Position: #3020 / 3903
  • Number of attempts: 1
Harder than "abcd > a b c d" - 71 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: #21 / 37
  • Number of attempts: 1
abcd > a b c d - 250 entries

transform the single spaces into 4 spaces repeat for each line

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

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

  • Best score: 28
  • Best player score: 38
  • Position: #22 / 41
  • Number of attempts: 1
switch variable - 4863 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 16
  • Position: #1529 / 1688
  • Number of attempts: 1
remove dupes from array - 1260 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: #147 / 321
  • Number of attempts: 2
expand a list comprehension (python) - 275 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: #49 / 102
  • Number of attempts: 1
Reformat long lines - 320 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: #88 / 125
  • Number of attempts: 3
Generate English Alphabets - 427 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Position: #85 / 190
  • Number of attempts: 1
Numbering a List - 1774 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Position: #321 / 609
  • Number of attempts: 1
Solve the Sokoban - 158 entries

A wink for all Vimgolfers that play Nethack too.

  • Best score: 25
  • Best player score: 31
  • Position: #42 / 69
  • Number of attempts: 1
The holy-grail may help - 304 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #158 / 190
  • Number of attempts: 1
A Simple One - 870 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 / 581
  • Number of attempts: 1
Reverse Simple Deletion - 739 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #165 / 418
  • Number of attempts: 1
Remove Accent off the Letter - 100 entries

Remove all the accent from extremely accented statements.

  • Best score: 37
  • Best player score: 67
  • Position: #30 / 46
  • Number of attempts: 1
Flodder-challenge - 829 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 36
  • Position: #134 / 257
  • 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: 23
  • Position: #2713 / 3335
  • Number of attempts: 2
Tact Overflow
Twitter:

The muppet at heartspring's centre.

entered into 41 challenges

contributed 0 challenges