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

Reformat/Refactor a Golfer Class - 5594 entries

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

  • Best score: 32
  • Best player score: 42
  • Number of attempts: 1
attr_aligner - 3159 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 28
  • Number of attempts: 5
Words in parens - 11693 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 1
Hole-in-one - 958 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 21
  • Number of attempts: 2
Switch function arguments - 1866 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
Letter case trickery - 1451 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 11
  • Number of attempts: 2
Write Setters and Getters for PHP - 86 entries

Just simple automation of writing Setters and Getters like Doctrine might use.

  • Best score: 102
  • Best player score: 176
  • Number of attempts: 2
Carriage return - 41 entries

I have some raw data from terminal output which uses carriege return for formatting. Carriage return sets the pointer to the first character on the line, and subsequent characters will overwrite what was there before. The challange is to simulate the terminal behaviour in vim. I'm kind of unsure if I should have skipped lines 9 and 15, since there might be some interesting solutions which are not that generic. Happy Golfing!

  • Best score: 22
  • Best player score: 29
  • Number of attempts: 1
switch variable - 4513 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
quotes inside quotes - 2885 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 2
Lucius L. Hilley III
Twitter:

Why does twitter have to AUTO refresh?

entered into 10 challenges

contributed 0 challenges