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

Deleting folded text - 274 entries

The text below contains three folds. Delete them (and the text inside them). For example: 123 456 /*{{{*/ 789 /*}}}*/ 012 Should become: 123 012 Also, add `aoeuaoeu` to make sure small solutions don't get flagged as cheating.

  • Best score: 17
  • Best player score: 22
  • Number of attempts: 3
Simple, Practical, and Common - 23260 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: 2
  • Best player score: 29
  • Number of attempts: 3
Get rid of html tags - 311 entries

Want to read more about Vim's background? Then get rid of those html tags...

  • Best score: 15
  • Best player score: 17
  • Number of attempts: 3
A Simple One - 831 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
Increment, increment, increment.... - 479 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 1
comment and uncomment code inline - 731 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 3
Context insensitive completion 0 - 443 entries

Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.

  • Best score: 7
  • Best player score: 10
  • Number of attempts: 1
The Cake is a Lie - 1109 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 4
Marco Fontani

Marco Fontani is a freelance Perl developer, mainly working for The Register, and a Camel and penguin whisperer in his spare time.

entered into 8 challenges

contributed 0 challenges