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 - 5622 entries

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

  • Best score: 32
  • Best player score: 36
  • Number of attempts: 5
vim = 22 / 7 - 406 entries

pi square vim

  • Best score: 20
  • Best player score: 33
  • Number of attempts: 3
The holy-grail may help - 302 entries

Can you find it in less than 20 strokes, Arthur?

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 4
The Quick Brown Fox Jumps Over The Lazy Vim - 333 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: 2
Prefixes and suffixes - 523 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 28
  • Number of attempts: 3
Whitespace, empty lines and tabs - 2688 entries

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

  • Best score: 16
  • Best player score: 22
  • Number of attempts: 6
Swap assigned value - 505 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 3
Reverse characters in a line - 601 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 3
Just the middle - 10074 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 11
  • Number of attempts: 1
Remove noise from HTTP log - 622 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 3
Stairs Indenting - 380 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
Count both ways - 903 entries

Right AND down.

  • Best score: 13
  • Best player score: 17
  • Number of attempts: 1
Saving the hashes(#) - 1854 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: 21
  • Number of attempts: 5
gnobbles
Twitter:

entered into 13 challenges

contributed 0 challenges