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

Search and Replace 0 - 5007 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 12
  • Position: #252 / 1631
  • Number of attempts: 6
Create Leading Zeros - 245 entries

Create leading zeros only for id columns. Please use generic approach!

  • Best score: 23
  • Best player score: 24
  • Position: #16 / 84
  • Number of attempts: 3
VimGolfNight - 575 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #81 / 352
  • Number of attempts: 3
Split the words - 372 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

  • Best score: 18
  • Best player score: 18
  • Position: #3 / 112
  • Number of attempts: 8
attr_aligner - 3525 entries

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

  • Best score: 19
  • Best player score: 20
  • Position: #186 / 706
  • Number of attempts: 10
Ninjas Leaderboard - 102 entries

The two lines in "Start file" has an obfuscated email address. Second line give an index (from 1 to 30) to the chars list of the first line, for example, the first char of email (n) is in position 25, second char (i) is in position 19 and s.o.

  • Best score: 25
  • Best player score: 29
  • Position: #7 / 42
  • Number of attempts: 3
Letter case trickery - 1644 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: 10
  • Position: #60 / 520
  • Number of attempts: 5
quotes inside quotes - 3182 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: 14
  • Position: #47 / 1085
  • Number of attempts: 5
Words in parens - 12969 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #100 / 3970
  • Number of attempts: 10
Hole-in-one - 1024 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: 16
  • Position: #32 / 305
  • Number of attempts: 6
switch variable - 5085 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #202 / 1750
  • Number of attempts: 4
Simple text editing with Vim - 13095 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #191 / 3767
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 7230 entries

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

  • Best score: 10
  • Best player score: 32
  • Position: #72 / 1779
  • Number of attempts: 10
StarkHalo
Twitter:

Account for VimGolf

entered into 13 challenges

contributed 0 challenges