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 - 33621 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: 22
  • Position: #447 / 7422
  • Number of attempts: 8
One number per line - 18732 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1088 / 3865
  • Number of attempts: 7
V to the i - 4802 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #155 / 1893
  • Number of attempts: 2
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: 15
  • Position: #427 / 753
  • Number of attempts: 6
Search and Replace 0 - 4989 entries

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

  • Best score: 12
  • Best player score: 19
  • Position: #1433 / 1624
  • Number of attempts: 1
That hyphen - 2595 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #49 / 701
  • Number of attempts: 3
Just the middle - 11457 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1625 / 4198
  • Number of attempts: 1
Basic renumbering - 5648 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 23
  • Position: #977 / 1264
  • Number of attempts: 1
create arrows in a list - 117 entries

Add arrow at same distance

  • Best score: 10
  • Best player score: 10
  • Position: #31 / 73
  • Number of attempts: 1
Vice versa - 7910 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Position: #1739 / 2129
  • Number of attempts: 1
Generate a list of numbers - 295 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 14
  • Position: #18 / 140
  • Number of attempts: 3
Swap assigned value - 647 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 12
  • Position: #207 / 254
  • Number of attempts: 1
readability - 327 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 18
  • Position: #11 / 152
  • Number of attempts: 3
Fix the XML - 1039 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 25
  • Position: #153 / 290
  • Number of attempts: 2
Mute the second method of this script - 455 entries

prepend a # infront of every line of the second method

  • Best score: 8
  • Best player score: 9
  • Position: #81 / 239
  • Number of attempts: 2
Happy TvvO - 427 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 14
  • Position: #190 / 206
  • Number of attempts: 1
I forgot quotes - 15989 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #79 / 4181
  • Number of attempts: 7
learn vim in short time - 240 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #56 / 161
  • Number of attempts: 2
-a-b-c- - 3213 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Position: #69 / 1137
  • Number of attempts: 4
Do you demand a shrubbery? - 1158 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 31
  • Position: #216 / 300
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10669 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #704 / 3684
  • Number of attempts: 5
quotes inside quotes - 3159 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: #181 / 1078
  • Number of attempts: 4
Words in parens - 12939 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 17
  • Position: #2650 / 3964
  • Number of attempts: 1
Dehamlizing - 185 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 43
  • Position: #48 / 72
  • Number of attempts: 1
Alphabetize the directory - 298 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 63
  • Position: #96 / 101
  • Number of attempts: 1
The holy-grail may help - 366 entries

Can you find it in less than 20 strokes, Arthur?

  • Best score: 16
  • Best player score: 16
  • Position: #137 / 209
  • Number of attempts: 2
Shebangs for all - 1999 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 15
  • Position: #276 / 516
  • Number of attempts: 6
Ruby 1.9 compat - 629 entries

Remember when Ruby supported `when <expr> :`? Well, it doesn't in 1.9, so let's make sure we use `then`, without ruining our lovely new hash syntax!

  • Best score: 14
  • Best player score: 17
  • Position: #148 / 234
  • Number of attempts: 4
Reverse Simple Deletion - 847 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 11
  • Position: #33 / 458
  • Number of attempts: 4
The Cake is a Lie - 1346 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #204 / 527
  • Number of attempts: 2
Change the content of a string - 1580 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #154 / 588
  • Number of attempts: 5
Simple text editing with Vim - 12815 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #328 / 3696
  • Number of attempts: 4
Rathrio
Twitter:

entered into 32 challenges

contributed 0 challenges