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 - 33385 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: #2808 / 7364
  • Number of attempts: 7
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1562 / 3842
  • Number of attempts: 5
V to the i - 4751 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1544 / 1879
  • Number of attempts: 1
Split line with dots - 2125 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #288 / 630
  • Number of attempts: 2
Search and Replace 0 - 4792 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #847 / 1585
  • Number of attempts: 6
That hyphen - 2556 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #495 / 695
  • Number of attempts: 1
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1573 / 4164
  • Number of attempts: 4
Make HTML List - 1039 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 47
  • Position: #145 / 271
  • Number of attempts: 2
Interweave two blocks of text - 631 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: #140 / 211
  • Number of attempts: 1
Basic renumbering - 5587 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 26
  • Position: #1159 / 1258
  • Number of attempts: 1
Vice versa - 7803 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Position: #1705 / 2100
  • Number of attempts: 1
C Reformatting - 688 entries

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

  • Best score: 30
  • Best player score: 59
  • Position: #116 / 161
  • Number of attempts: 1
Mirror Symmetry - 798 entries

Add backslashes.

  • Best score: 7
  • Best player score: 12
  • Position: #130 / 266
  • Number of attempts: 2
Simple format (2) - 334 entries

try again!

  • Best score: 23
  • Best player score: 37
  • Position: #55 / 69
  • Number of attempts: 1
Merge blank lines and properly capitalize - 81 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: #23 / 23
  • Number of attempts: 1
Fix the XML - 996 entries

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

  • Best score: 18
  • Best player score: 29
  • Position: #231 / 284
  • Number of attempts: 1
Happy TvvO - 407 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #156 / 201
  • Number of attempts: 2
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2404 / 4161
  • Number of attempts: 1
Gray area - 732 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 14
  • Position: #208 / 268
  • Number of attempts: 2
Do you demand a shrubbery? - 1120 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 18
  • Position: #139 / 293
  • Number of attempts: 3
Don't know what this is - 1978 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: #472 / 578
  • Number of attempts: 1
Mess in revision history - 1161 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 27
  • Position: #161 / 247
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10624 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #571 / 3666
  • Number of attempts: 3
Letter case trickery - 1594 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: #430 / 511
  • Number of attempts: 1
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 19
  • Position: #3058 / 3946
  • Number of attempts: 1
Harder than "abcd > a b c d" - 77 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: #23 / 40
  • Number of attempts: 1
abcd > a b c d - 280 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #78 / 218
  • Number of attempts: 1
Extract text from xml - 109 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 / 44
  • Number of attempts: 1
switch variable - 5036 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 16
  • Position: #1570 / 1736
  • Number of attempts: 1
remove dupes from array - 1336 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: #154 / 331
  • Number of attempts: 2
expand a list comprehension (python) - 301 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: #51 / 106
  • Number of attempts: 1
Reformat long lines - 341 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: #93 / 130
  • Number of attempts: 3
Generate English Alphabets - 473 entries

Start with a, get up to z.

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

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Position: #347 / 639
  • Number of attempts: 1
Solve the Sokoban - 164 entries

A wink for all Vimgolfers that play Nethack too.

  • Best score: 25
  • Best player score: 31
  • Position: #43 / 72
  • Number of attempts: 1
The holy-grail may help - 345 entries

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

  • Best score: 16
  • Best player score: 17
  • Position: #167 / 205
  • Number of attempts: 1
A Simple One - 1001 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 / 643
  • 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: #176 / 454
  • Number of attempts: 1
Remove Accent off the Letter - 106 entries

Remove all the accent from extremely accented statements.

  • Best score: 37
  • Best player score: 67
  • Position: #32 / 49
  • Number of attempts: 1
Flodder-challenge - 1117 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 36
  • Position: #161 / 311
  • Number of attempts: 1
Simple text editing with Vim - 12290 entries

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

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

The muppet at heartspring's centre.

entered into 41 challenges

contributed 0 challenges