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

Extract argument from function - 2355 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 15
  • Position: #401 / 752
  • Number of attempts: 2
Words in parens - 12928 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2107 / 3960
  • Number of attempts: 3
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: 44
  • Position: #31 / 61
  • Number of attempts: 2
The name of the game - 665 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #72 / 360
  • Number of attempts: 1
Stairs Indenting - 473 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 19
  • Position: #176 / 197
  • Number of attempts: 1
Saving the hashes(#) - 2053 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 28
  • Position: #270 / 479
  • Number of attempts: 5
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #160 / 445
  • Number of attempts: 4
Switch function arguments - 2118 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #208 / 657
  • Number of attempts: 5
Append semicolon after expressions - 1046 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #179 / 413
  • Number of attempts: 5
imports alignment (python) - 700 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 22
  • Position: #102 / 198
  • Number of attempts: 4
Matt Walker
Twitter:

Geospatial Thingy-me-jig at Astun Technology. Opinions my own.

entered into 10 challenges

contributed 0 challenges