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

Search and Replace 0 - 4210 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 4
-a-b-c- - 2689 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 3
Swap assigned value - 499 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 15
  • Number of attempts: 1
The name of the game - 587 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
Make it more readable - 1769 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 4
The meaning - 504 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
Append semicolon after expressions - 880 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 6
Unwrap the text of an email message - 150 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
  • Number of attempts: 1
Let's play some Ivmgolf - 943 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 5
A Simple One - 849 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
  • Number of attempts: 1
Reconstruct the Sentence - 1028 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
  • Number of attempts: 2
Simple text editing with Vim - 10680 entries

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

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 5
SFD-ROC: The Quick Brown Fox - 140 entries

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

  • Best score: 25
  • Best player score: 28
  • Number of attempts: 4
The Quick Brown Fox Jumps Over The Lazy Vim - 330 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: 10
  • Best player score: 10
  • Number of attempts: 3
A simple change - 362 entries

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

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 4
Remove noise from HTTP log - 618 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
  • Number of attempts: 7
Reverse and double space - 411 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 2
Vertical Limit - 2167 entries

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

  • Best score: 21
  • Best player score: 26
  • Number of attempts: 3
Printable ASCII characters - 95 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
  • Number of attempts: 4
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: 54
  • Number of attempts: 2
Block Fun 1 - 158 entries

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 25
  • Number of attempts: 2
Simple, Practical, and Common - 26840 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
  • Number of attempts: 5
Changing URL path in CSS - 113 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
  • Number of attempts: 5

Contributed Challenges

Extract text from xml - 101 entries

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

mhb
Twitter:

entered into 23 challenges

contributed 1 challenges