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

Rural Post - 4362 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 10
  • Position: #305 / 1071
  • Number of attempts: 3
Add quotes to ansible playbook - 926 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 11
  • Position: #262 / 295
  • Number of attempts: 1
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: 25
  • Position: #3148 / 7364
  • Number of attempts: 11
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1999 / 3842
  • Number of attempts: 8
Add semicolons - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1357 / 3044
  • Number of attempts: 5
Search and Replace 0 - 4790 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #177 / 1585
  • Number of attempts: 4
Swap assigned value - 624 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 15
  • Position: #232 / 249
  • Number of attempts: 1
-a-b-c- - 3176 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Position: #93 / 1129
  • Number of attempts: 3
Block Fun 1 - 189 entries

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 25
  • Position: #59 / 73
  • Number of attempts: 2
Changing URL path in CSS - 129 entries

What's the quickest way to swap out all the URLs in a CSS file? Is it wasted keystrokes using look-behinds and look-aheads? (I'm sorry for the delete/report--I made a mistake with the last one requiring an ugly search for graphic to replace with images. I just intended this to be a simple search and replace that might possibly generate some macros or normals solutions that are quicker)

  • Best score: 40
  • Best player score: 40
  • Position: #18 / 59
  • Number of attempts: 5
Printable ASCII characters - 124 entries

From a blank input, print all 95 printing ASCII characters one per line, from space to tilde.

  • Best score: 22
  • Best player score: 45
  • Position: #31 / 42
  • Number of attempts: 4
A simple change - 442 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #132 / 189
  • Number of attempts: 4
SFD-ROC: The Quick Brown Fox - 169 entries

Someone has vandalized our text (again). Please fix to read: The Quick Brown Fox Jumps Over The Lazy Dog.

  • Best score: 24
  • Best player score: 28
  • Position: #30 / 101
  • Number of attempts: 4
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: 54
  • Position: #37 / 44
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 401 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: 10
  • Position: #30 / 188
  • Number of attempts: 3
The name of the game - 650 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #24 / 356
  • Number of attempts: 4
Unwrap the text of an email message - 185 entries

Reverse of "Wrap the text of an email message to 79 characters". gq and gw are great for wrapping paragraphs. But sometimes other programs choke on your wrapped lines. What's the best way to un-gq?

  • Best score: 16
  • Best player score: 29
  • Position: #66 / 72
  • Number of attempts: 1
Let's play some Ivmgolf - 1091 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Position: #6 / 441
  • Number of attempts: 5
Vertical Limit - 2437 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 26
  • Position: #410 / 736
  • Number of attempts: 3
Append semicolon after expressions - 1005 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #168 / 403
  • Number of attempts: 6
Reverse and double space - 489 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Position: #132 / 194
  • Number of attempts: 2
Remove noise from HTTP log - 695 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: 16
  • Position: #161 / 270
  • Number of attempts: 7
The meaning - 558 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #159 / 356
  • Number of attempts: 1
Make it more readable - 1952 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Position: #235 / 640
  • Number of attempts: 4
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: #292 / 643
  • Number of attempts: 1
Reconstruct the Sentence - 1363 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 20
  • Best player score: 25
  • Position: #309 / 383
  • Number of attempts: 2
Simple text editing with Vim - 12281 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #101 / 3580
  • Number of attempts: 5

Contributed Challenges

Extract text from xml - 109 entries

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

mhb
Twitter:

entered into 27 challenges

contributed 1 challenges