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 - 33647 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: 26
  • Position: #3446 / 7425
  • Number of attempts: 1
V to the i - 4810 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1094 / 1896
  • Number of attempts: 1
From argument to object - 1508 entries

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

  • Best score: 17
  • Best player score: 18
  • Position: #187 / 458
  • Number of attempts: 3
Extract argument from function - 2357 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #142 / 753
  • Number of attempts: 3
comment and uncomment code inline - 1122 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: 10
  • Position: #174 / 322
  • Number of attempts: 2
Just the middle - 11464 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2029 / 4202
  • Number of attempts: 1
Adam's challenge - 984 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: 21
  • Position: #147 / 270
  • Number of attempts: 1
Space out the alphabet - 1657 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 17
  • Position: #176 / 444
  • Number of attempts: 2
Dehamlizing - 185 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 40
  • Position: #31 / 72
  • Number of attempts: 1
NATO phonetic alphabet - 529 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Position: #80 / 196
  • Number of attempts: 3
Shuffle and Sort - 229 entries

The values where sorted incorrectly. Get them back to how they are supposed to be

  • Best score: 17
  • Best player score: 27
  • Position: #45 / 67
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 425 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 12
  • Position: #170 / 193
  • Number of attempts: 1
Inconsistent real estate paste - 216 entries

Format a hand-typed real estate listing that uses inconsistent punctuation into four sections

  • Best score: 24
  • Best player score: 50
  • Position: #49 / 58
  • Number of attempts: 2
Vertical Limit - 2540 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 28
  • Position: #565 / 755
  • Number of attempts: 1
Append semicolon after expressions - 1056 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #165 / 419
  • Number of attempts: 3
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1304 / 1749
  • Number of attempts: 1
The meaning - 575 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #156 / 363
  • Number of attempts: 1
Line Zipper - 477 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Position: #170 / 216
  • Number of attempts: 2
remove dupes from array - 1358 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 20
  • Position: #130 / 336
  • Number of attempts: 8
Numbering a List - 1932 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #233 / 653
  • Number of attempts: 4
Braces or Brackets? - 1033 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 43
  • Position: #138 / 320
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3691 entries

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

  • Best score: 16
  • Best player score: 21
  • Position: #229 / 794
  • Number of attempts: 9
Simple text editing with Vim - 12856 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #82 / 3707
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 7023 entries

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

  • Best score: 28
  • Best player score: 37
  • Position: #521 / 1720
  • Number of attempts: 7
Tom Sisk
Twitter:

entered into 24 challenges

contributed 0 challenges