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

A Simple One - 860 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
Make it more readable - 1818 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 4
Remove noise from HTTP log - 631 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 - 424 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 2
The name of the game - 597 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
Simple, Practical, and Common - 31737 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: 11
Block Fun 1 - 160 entries

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 25
  • Number of attempts: 2
Append semicolon after expressions - 898 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 - 154 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
SFD-ROC: The Quick Brown Fox - 145 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
-a-b-c- - 3004 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 3
The Quick Brown Fox Jumps Over The Lazy Vim - 339 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
Search and Replace 0 - 4479 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 4
Add semicolons - 9340 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 3
Let's play some Ivmgolf - 976 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 5
Swap assigned value - 525 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 15
  • Number of attempts: 1
Reconstruct the Sentence - 1042 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
Vertical Limit - 2264 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
Simple text editing with Vim - 11200 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
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
Add quotes to ansible playbook - 312 entries

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

  • Best score: 8
  • Best player score: 11
  • Number of attempts: 1
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
Rural Post - 2084 entries

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

  • Best score: 9
  • Best player score: 10
  • 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
The meaning - 515 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
A simple change - 377 entries

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

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 4

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 26 challenges

contributed 1 challenges