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 - 33483 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: #3458 / 7384
  • Number of attempts: 6
Split line with dots - 2131 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 18
  • Position: #265 / 633
  • Number of attempts: 2
Vice versa - 7865 entries

Little role switching.

  • Best score: 12
  • Best player score: 13
  • Position: #679 / 2114
  • Number of attempts: 5
Do you demand a shrubbery? - 1136 entries

Use :redir and crush the emacsgolfers.

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

We should all ace this, right?

  • Best score: 13
  • Best player score: 22
  • Position: #3541 / 3950
  • Number of attempts: 1
Dehamlizing - 184 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 43
  • Position: #45 / 71
  • Number of attempts: 2
Changing URL path in CSS - 136 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: #45 / 61
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 404 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: #26 / 190
  • Number of attempts: 2
The name of the game - 654 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #12 / 359
  • Number of attempts: 2
Cleanining up 80 column concatenated text - 194 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: #57 / 78
  • Number of attempts: 1
Inconsistent real estate paste - 185 entries

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

  • Best score: 24
  • Best player score: 34
  • Position: #27 / 56
  • Number of attempts: 4
Vertical Limit - 2487 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #404 / 748
  • Number of attempts: 2
Aligning function arguments to match a specific coding style - 230 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: #51 / 70
  • Number of attempts: 1
replacing each line of a block selection - 2966 entries

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

  • Best score: 18
  • Best player score: 23
  • Position: #443 / 772
  • Number of attempts: 2
Switch function arguments - 2085 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Position: #439 / 653
  • Number of attempts: 2
Append semicolon after expressions - 1023 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 13
  • Position: #283 / 410
  • Number of attempts: 2
Reverse and double space - 498 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Position: #132 / 197
  • Number of attempts: 1
Remove noise from HTTP log - 700 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: #157 / 272
  • Number of attempts: 2
Remove semicolons after expressions - 639 entries

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

  • Best score: 6
  • Best player score: 8
  • Position: #181 / 261
  • Number of attempts: 2
switch variable - 5045 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1064 / 1742
  • Number of attempts: 1
Replacing some words - 420 entries

How fast could it be?

  • Best score: 17
  • Best player score: 25
  • Position: #100 / 149
  • Number of attempts: 1
Ruby 1.9 hashes - 1225 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: #150 / 402
  • Number of attempts: 2
Reverse and count - 459 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: #130 / 174
  • Number of attempts: 1
Reverse Simple Deletion - 834 entries

You did the simple deletion, now reverse it.

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

I do computer stuff. Sometimes other stuff too.

entered into 24 challenges

contributed 0 challenges