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

A Simple One - 852 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
I forgot quotes - 14300 entries

Oops.

  • Best score: 10
  • Best player score: 17
  • Number of attempts: 1
quotes inside quotes - 2942 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: 17
  • Number of attempts: 1
Copy three lines - 2457 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 18
  • Number of attempts: 3
Generate English Alphabets - 424 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 26
  • Number of attempts: 3
Just the middle - 10338 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 3
Search and Replace 0 - 4434 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 4
-a-b-c- - 2864 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 1
V to the i - 4341 entries

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

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 1
One number per line - 16293 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 18
  • Number of attempts: 1
Vice versa - 6869 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 2
Words in parens - 11996 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 1
Split line with dots - 2007 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 6
Collect List - 3882 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 17
  • Number of attempts: 1
Simple, Practical, and Common - 29850 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: 25
  • Number of attempts: 3
switch variable - 4614 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 5661 entries

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

  • Best score: 32
  • Best player score: 38
  • Number of attempts: 2
Extract argument from function - 2127 entries

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

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 1
Numbering a List - 1760 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 21
  • Number of attempts: 1
Jonathan Elliott
Twitter:

I like maths, crosswords and beer.

entered into 19 challenges

contributed 0 challenges