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 - 34012 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: 23
  • Position: #2645 / 7513
  • Number of attempts: 10
One number per line - 18903 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #435 / 3904
  • Number of attempts: 18
V to the i - 4883 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #564 / 1914
  • Number of attempts: 4
Every other line - 2951 entries

AaAaAaA

  • Best score: 12
  • Best player score: 12
  • Position: #15 / 712
  • Number of attempts: 7
Copy three lines - 2923 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #94 / 647
  • Number of attempts: 9
Number Sort - 328 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

  • Best score: 9
  • Best player score: 9
  • Position: #45 / 173
  • Number of attempts: 1
Just the middle - 11616 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2681 / 4255
  • Number of attempts: 3
Adam's challenge - 1042 entries

Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.

  • Best score: 18
  • Best player score: 25
  • Position: #247 / 281
  • Number of attempts: 1
Vice versa - 8019 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #367 / 2157
  • Number of attempts: 9
Line under headers - 2095 entries

Put a line under each header, and remove the other markdown formatting.

  • Best score: 24
  • Best player score: 46
  • Position: #478 / 515
  • Number of attempts: 2
Collect List - 4341 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #370 / 1200
  • Number of attempts: 8
I forgot quotes - 16237 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #752 / 4224
  • Number of attempts: 8
Don't know what this is - 2066 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 11
  • Position: #97 / 594
  • Number of attempts: 6
quotes inside quotes - 3202 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: 14
  • Position: #293 / 1093
  • Number of attempts: 5
Words in parens - 13053 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #900 / 3991
  • Number of attempts: 8
Make it more readable - 2039 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 14
  • Position: #187 / 658
  • Number of attempts: 7
Whitespace, empty lines and tabs - 4044 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 33
  • Position: #678 / 862
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 7681 entries

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

  • Best score: 7
  • Best player score: 56
  • Position: #1636 / 1889
  • Number of attempts: 1
sspan
Twitter:

entered into 18 challenges

contributed 0 challenges