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 - 33757 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: 26
  • Position: #3486 / 7450
  • Number of attempts: 6
Split line with dots - 2154 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #266 / 635
  • Number of attempts: 2
Vice versa - 7968 entries

Little role switching.

  • Best score: 12
  • Best player score: 13
  • Position: #686 / 2144
  • Number of attempts: 5
Do you demand a shrubbery? - 1164 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 18
  • Position: #122 / 301
  • Number of attempts: 2
Words in parens - 12969 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 22
  • Position: #3560 / 3970
  • Number of attempts: 1
Dehamlizing - 185 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 43
  • Position: #45 / 72
  • Number of attempts: 2
Changing URL path in CSS - 143 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: 50
  • Position: #47 / 64
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 425 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: #27 / 193
  • Number of attempts: 2
The name of the game - 678 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #12 / 363
  • Number of attempts: 2
Cleanining up 80 column concatenated text - 206 entries

1. Put the whole query on one line, remove the concatenation operators 2. Remove the double spaces that appear a few times in the query 3. Use string-interpolated variable statementPid rather than the ugly concatenation

  • Best score: 31
  • Best player score: 48
  • Position: #58 / 80
  • Number of attempts: 1
Inconsistent real estate paste - 217 entries

Format a hand-typed real estate listing that uses inconsistent punctuation into four sections

  • Best score: 24
  • Best player score: 34
  • Position: #29 / 59
  • Number of attempts: 4
Vertical Limit - 2564 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #412 / 759
  • Number of attempts: 2
Aligning function arguments to match a specific coding style - 259 entries

Most projects have specific coding style guidelines. In this case, the argument list must be broken into a new line for each argument, with the argument names right aligned, taking into account pointers.

  • Best score: 16
  • Best player score: 23
  • Position: #53 / 72
  • Number of attempts: 1
replacing each line of a block selection - 3005 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 23
  • Position: #446 / 779
  • Number of attempts: 2
Switch function arguments - 2152 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Position: #450 / 667
  • Number of attempts: 2
Append semicolon after expressions - 1057 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 13
  • Position: #289 / 420
  • Number of attempts: 2
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: #132 / 199
  • Number of attempts: 1
Remove noise from HTTP log - 724 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: #159 / 275
  • Number of attempts: 2
Remove semicolons after expressions - 663 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 8
  • Position: #184 / 264
  • Number of attempts: 2
switch variable - 5085 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1069 / 1750
  • Number of attempts: 1
Replacing some words - 428 entries

How fast could it be?

  • Best score: 17
  • Best player score: 25
  • Position: #101 / 151
  • Number of attempts: 1
Ruby 1.9 hashes - 1260 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 12
  • Best player score: 13
  • Position: #155 / 410
  • Number of attempts: 2
Reverse and count - 486 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

  • Best score: 18
  • Best player score: 32
  • Position: #133 / 179
  • Number of attempts: 1
Reverse Simple Deletion - 857 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #237 / 461
  • Number of attempts: 2
Michael Limiero
Twitter:

I do computer stuff. Sometimes other stuff too.

entered into 24 challenges

contributed 0 challenges