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 - 33343 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: #3442 / 7356
  • Number of attempts: 6
Split line with dots - 2124 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #264 / 629
  • Number of attempts: 2
Vice versa - 7761 entries

Little role switching.

  • Best score: 12
  • Best player score: 13
  • Position: #673 / 2093
  • Number of attempts: 5
Do you demand a shrubbery? - 1120 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 18
  • Position: #121 / 293
  • Number of attempts: 2
Words in parens - 12848 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 22
  • Position: #3534 / 3943
  • Number of attempts: 1
Dehamlizing - 177 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 43
  • Position: #44 / 68
  • Number of attempts: 2
Changing URL path in CSS - 123 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: #43 / 57
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 400 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: #25 / 187
  • Number of attempts: 2
The name of the game - 646 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #12 / 354
  • Number of attempts: 2
Cleanining up 80 column concatenated text - 186 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: #55 / 75
  • Number of attempts: 1
Inconsistent real estate paste - 179 entries

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

  • Best score: 24
  • Best player score: 34
  • Position: #26 / 54
  • Number of attempts: 4
Vertical Limit - 2426 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #396 / 733
  • Number of attempts: 2
Aligning function arguments to match a specific coding style - 218 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: #50 / 66
  • Number of attempts: 1
replacing each line of a block selection - 2923 entries

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

  • Best score: 18
  • Best player score: 23
  • Position: #439 / 763
  • Number of attempts: 2
Switch function arguments - 2050 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Position: #434 / 644
  • Number of attempts: 2
Append semicolon after expressions - 1001 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 13
  • Position: #279 / 400
  • Number of attempts: 2
Reverse and double space - 482 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Position: #129 / 192
  • Number of attempts: 1
Remove noise from HTTP log - 692 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: #155 / 269
  • Number of attempts: 2
Remove semicolons after expressions - 626 entries

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

  • Best score: 6
  • Best player score: 8
  • Position: #177 / 257
  • Number of attempts: 2
switch variable - 5026 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1060 / 1733
  • Number of attempts: 1
Replacing some words - 418 entries

How fast could it be?

  • Best score: 17
  • Best player score: 25
  • Position: #98 / 147
  • Number of attempts: 1
Ruby 1.9 hashes - 1213 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: #149 / 397
  • Number of attempts: 2
Reverse and count - 453 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: #127 / 172
  • Number of attempts: 1
Reverse Simple Deletion - 832 entries

You did the simple deletion, now reverse it.

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

I do computer stuff. Sometimes other stuff too.

entered into 24 challenges

contributed 0 challenges