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 - 33528 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: #2815 / 7396
  • Number of attempts: 7
One number per line - 18705 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1568 / 3855
  • Number of attempts: 5
V to the i - 4795 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1553 / 1891
  • Number of attempts: 1
Split line with dots - 2144 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #289 / 634
  • Number of attempts: 2
Search and Replace 0 - 4951 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #864 / 1614
  • 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 - 11411 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1576 / 4181
  • Number of attempts: 4
Make HTML List - 1050 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 47
  • Position: #147 / 273
  • Number of attempts: 2
Interweave two blocks of text - 658 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: #142 / 213
  • Number of attempts: 1
Basic renumbering - 5643 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 26
  • Position: #1162 / 1261
  • Number of attempts: 1
Vice versa - 7888 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Position: #1716 / 2119
  • 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 - 1035 entries

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

  • Best score: 18
  • Best player score: 29
  • Position: #236 / 289
  • Number of attempts: 1
Happy TvvO - 426 entries

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

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

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2408 / 4170
  • 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 - 2014 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: #476 / 582
  • Number of attempts: 1
Mess in revision history - 1183 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 27
  • Position: #163 / 249
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10654 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #571 / 3678
  • Number of attempts: 3
Letter case trickery - 1619 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: #434 / 515
  • Number of attempts: 1
Words in parens - 12918 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 19
  • Position: #3067 / 3957
  • Number of attempts: 1
Harder than "abcd > a b c d" - 93 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: #25 / 42
  • Number of attempts: 1
abcd > a b c d - 290 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #78 / 221
  • 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 - 5061 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 16
  • Position: #1574 / 1743
  • Number of attempts: 1
remove dupes from array - 1347 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: #156 / 334
  • Number of attempts: 2
expand a list comprehension (python) - 333 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 / 109
  • Number of attempts: 1
Reformat long lines - 358 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 / 134
  • 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 - 1926 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Position: #354 / 650
  • 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 - 362 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #170 / 208
  • Number of attempts: 1
A Simple One - 1033 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 / 656
  • Number of attempts: 1
Reverse Simple Deletion - 845 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #177 / 457
  • Number of attempts: 1
Remove Accent off the Letter - 126 entries

Remove all the accent from extremely accented statements.

  • Best score: 37
  • Best player score: 67
  • Position: #34 / 51
  • Number of attempts: 1
Flodder-challenge - 1219 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 36
  • Position: #169 / 327
  • Number of attempts: 1
Simple text editing with Vim - 12616 entries

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

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

The muppet at heartspring's centre.

entered into 41 challenges

contributed 0 challenges