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

Simple, Practical, and Common - 32765 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 41
  • Position: #6956 / 7241
  • Number of attempts: 1
One number per line - 18294 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 25
  • Position: #3221 / 3770
  • Number of attempts: 2
Extract argument from function - 2194 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #598 / 723
  • Number of attempts: 1
Just the middle - 11086 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #693 / 4093
  • Number of attempts: 5
Collect List - 4155 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 15
  • Position: #699 / 1161
  • Number of attempts: 5
-a-b-c- - 3081 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #934 / 1100
  • Number of attempts: 2
Where should I put the Newline? - 832 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Position: #179 / 416
  • Number of attempts: 2
quotes inside quotes - 2998 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: 16
  • Position: #606 / 1037
  • Number of attempts: 3
Saving the hashes(#) - 1937 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
  • Position: #380 / 462
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 5864 entries

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

  • Best score: 32
  • Best player score: 47
  • Position: #1132 / 1449
  • Number of attempts: 2
Thiago Belem
Twitter:

Software Engineer & Teacher

entered into 10 challenges

contributed 0 challenges