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

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: 46
  • Number of attempts: 1
Words in parens - 11363 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 31
  • Number of attempts: 1
replacing each line of a block selection - 2591 entries

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

  • Best score: 18
  • Best player score: 24
  • Number of attempts: 1
Change the content of a string - 1250 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 24
  • Number of attempts: 5
Inconsistent real estate paste - 142 entries

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

  • Best score: 24
  • Best player score: 37
  • Number of attempts: 2
Simple text editing with Vim - 10667 entries

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

  • Best score: 13
  • Best player score: 23
  • Number of attempts: 1
Shebangs for all - 1632 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 22
  • Number of attempts: 1
120 Degrees - 370 entries

Rotate that triangle.

  • Best score: 14
  • Best player score: 21
  • Number of attempts: 1
Whitespace, empty lines and tabs - 2589 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 21
  • Number of attempts: 7
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
you're stuck on jQuery < 1.7 - 317 entries

replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`

  • Best score: 25
  • Best player score: 28
  • Number of attempts: 2
V to the i - 4102 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 2
Line Zipper - 397 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 1
Ruby 1.9 hashes - 1086 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: 18
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1305 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 9
  • Number of attempts: 2
Switch function arguments - 1850 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 6
Dehamlizing - 155 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 55
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 5569 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 32
  • Best player score: 44
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 9715 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
Don't know what this is - 1805 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 5
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: 1
NATO phonetic alphabet - 407 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 19
  • Number of attempts: 3
Domon
Twitter:

Feel free to follow me, if you're not a spammer.

entered into 22 challenges

contributed 0 challenges