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 - 4468 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #314 / 1095
  • Number of attempts: 3
Add quotes to ansible playbook - 952 entries

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

  • Best score: 8
  • Best player score: 11
  • Position: #270 / 304
  • Number of attempts: 1
Simple, Practical, and Common - 33609 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: #3165 / 7415
  • Number of attempts: 11
One number per line - 18712 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #2006 / 3859
  • Number of attempts: 8
Add semicolons - 10848 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1360 / 3061
  • Number of attempts: 5
Search and Replace 0 - 4978 entries

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

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

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 15
  • Position: #235 / 253
  • Number of attempts: 1
-a-b-c- - 3213 entries

Put hyphens everywhere.

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

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 25
  • Position: #61 / 75
  • Number of attempts: 2
Changing URL path in CSS - 138 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 / 62
  • Number of attempts: 5
Printable ASCII characters - 142 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: #33 / 44
  • Number of attempts: 4
A simple change - 461 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #134 / 191
  • Number of attempts: 4
SFD-ROC: The Quick Brown Fox - 193 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: #33 / 106
  • Number of attempts: 4
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: 54
  • Position: #39 / 46
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 416 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: #32 / 191
  • Number of attempts: 3
The name of the game - 665 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #24 / 360
  • Number of attempts: 4
Unwrap the text of an email message - 189 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: #67 / 74
  • Number of attempts: 1
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

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

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

  • Best score: 21
  • Best player score: 26
  • Position: #421 / 754
  • Number of attempts: 3
Append semicolon after expressions - 1054 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #174 / 418
  • Number of attempts: 6
Reverse and double space - 500 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Position: #134 / 199
  • Number of attempts: 2
Remove noise from HTTP log - 717 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: #164 / 273
  • Number of attempts: 7
The meaning - 575 entries

Numbers are fun!

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

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Position: #238 / 649
  • Number of attempts: 4
A Simple One - 1047 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 / 662
  • Number of attempts: 1
Reconstruct the Sentence - 1487 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: #326 / 409
  • Number of attempts: 2
Simple text editing with Vim - 12744 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 / 3681
  • Number of attempts: 5

Contributed Challenges

Extract text from xml - 127 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