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

attr_aligner - 3025 entries

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

  • Best score: 19
  • Best player score: 134
  • Number of attempts: 1
Python Hello World! Reformatting - 836 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 42
  • Number of attempts: 4
Saving the hashes(#) - 1765 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: 30
  • Number of attempts: 3
Shebangs for all - 1595 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 25
  • Number of attempts: 1
Hole-in-one - 936 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: 24
  • Number of attempts: 2
Make HTML List - 903 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 51
  • Number of attempts: 3
Numbering a List - 1733 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 22
  • Number of attempts: 4
Switch function arguments - 1840 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 4
Letter case trickery - 1443 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: 30
  • Number of attempts: 1
Collect List - 3533 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 7
A HAPPY NEW YEAR 2014 ! - 9550 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 10
SFD-ROC: vimvimvim - 1294 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 14
  • Number of attempts: 1
quotes inside quotes - 2799 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: 18
  • Number of attempts: 3
I forgot quotes - 11969 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Number of attempts: 5
Just the middle - 9337 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 4
Words in parens - 11108 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 13
Make it more readable - 1756 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 4
switch variable - 4324 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 16
  • Number of attempts: 4
ren
Twitter:

entered into 18 challenges

contributed 0 challenges