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

V to the i - 4818 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 7
  • Position: #184 / 1898
  • Number of attempts: 3
Extract argument from function - 2364 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 13
  • Position: #115 / 755
  • Number of attempts: 3
That hyphen - 2595 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #62 / 701
  • Number of attempts: 5
Just the middle - 11495 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1760 / 4213
  • Number of attempts: 1
Space out the alphabet - 1659 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 18
  • Position: #216 / 446
  • Number of attempts: 2
Fix the XML - 1039 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 19
  • Position: #67 / 290
  • Number of attempts: 4
I forgot quotes - 16038 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1539 / 4192
  • Number of attempts: 3
Count both ways - 1022 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #217 / 354
  • Number of attempts: 2
Gray area - 747 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 12
  • Position: #70 / 271
  • Number of attempts: 3
Where should I put the Newline? - 881 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #350 / 437
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10688 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #674 / 3691
  • Number of attempts: 4
attr_aligner - 3522 entries

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

  • Best score: 19
  • Best player score: 27
  • Position: #294 / 703
  • Number of attempts: 1
Letter case trickery - 1630 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
  • Position: #267 / 518
  • Number of attempts: 1
Saving the hashes(#) - 2063 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: 29
  • Position: #340 / 480
  • Number of attempts: 1
replacing each line of a block selection - 3005 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 20
  • Position: #268 / 779
  • Number of attempts: 3
Simple text editing with Vim - 13017 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #2477 / 3745
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 7173 entries

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

  • Best score: 28
  • Best player score: 33
  • Position: #249 / 1761
  • Number of attempts: 7
Garrett Smith
Twitter:

entered into 17 challenges

contributed 0 challenges