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

Interweave two blocks of text - 659 entries

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

  • Best score: 15
  • Best player score: 15
  • Position: #5 / 214
  • Number of attempts: 7
Dehamlizing - 185 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 38
  • Position: #25 / 72
  • Number of attempts: 3
Changing URL path in CSS - 138 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: 40
  • Position: #17 / 62
  • Number of attempts: 3
Shuffle and Sort - 229 entries

The values where sorted incorrectly. Get them back to how they are supposed to be

  • Best score: 17
  • Best player score: 28
  • Position: #54 / 67
  • Number of attempts: 1
Cleanining up 80 column concatenated text - 203 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: 34
  • Position: #29 / 79
  • Number of attempts: 5
Inconsistent real estate paste - 213 entries

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

  • Best score: 24
  • Best player score: 26
  • Position: #18 / 57
  • Number of attempts: 2
Vertical Limit - 2538 entries

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

  • Best score: 21
  • Best player score: 22
  • Position: #126 / 754
  • Number of attempts: 7
Aligning function arguments to match a specific coding style - 247 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: 22
  • Position: #46 / 71
  • Number of attempts: 2
Switch function arguments - 2126 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #37 / 660
  • Number of attempts: 6
Sune Simonsen
Twitter:

Web Hacker at http://t.co/bvcCHrCN

entered into 9 challenges

contributed 0 challenges