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 - 34021 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: 28
  • Position: #4351 / 7517
  • Number of attempts: 3
Swap values - 4707 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 17
  • Position: #1141 / 1294
  • Number of attempts: 1
One number per line - 18903 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 25
  • Position: #3347 / 3904
  • Number of attempts: 1
V to the i - 4885 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1290 / 1915
  • Number of attempts: 2
Split line with dots - 2175 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 22
  • Position: #460 / 639
  • Number of attempts: 1
Every other line - 2951 entries

AaAaAaA

  • Best score: 12
  • Best player score: 18
  • Position: #564 / 712
  • Number of attempts: 1
Copy three lines - 2924 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #266 / 647
  • Number of attempts: 3
Extract argument from function - 2429 entries

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

  • Best score: 13
  • Best player score: 19
  • Position: #704 / 773
  • Number of attempts: 2
Start coding format - 168 entries

I used to start coding with following format: int main(){ -(cursor here) }

  • Best score: 22
  • Best player score: 29
  • Position: #76 / 76
  • Number of attempts: 1
Search and Replace 0 - 5162 entries

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

  • Best score: 12
  • Best player score: 16
  • Position: #1258 / 1675
  • Number of attempts: 2
Just the middle - 11620 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3566 / 4258
  • Number of attempts: 2
Team names - 1861 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 18
  • Position: #359 / 596
  • Number of attempts: 3
For all cases. - 180 entries

In this case... change it! :) Watch the line.

  • Best score: 8
  • Best player score: 9
  • Position: #100 / 111
  • Number of attempts: 2
Missing Library and a Typo - 954 entries

I forgot to add a c library, please add it for me. Also I'm bad at typing so fix my typo too.

  • Best score: 14
  • Best player score: 43
  • Position: #222 / 223
  • Number of attempts: 1
Simple addition - 351 entries

The right side of the equation is already there. We just need the left one now.

  • Best score: 12
  • Best player score: 20
  • Position: #127 / 128
  • Number of attempts: 1
Nesting SASS - 302 entries

Move a block inside another block and indent it

  • Best score: 9
  • Best player score: 20
  • Position: #93 / 102
  • Number of attempts: 2
Vice versa - 8021 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1341 / 2158
  • Number of attempts: 1
Sorting a glossary - 138 entries

Sort a glossary. Glossary head contains a header phrase ending with ':' and glossary body has multi line text indented with a tab.

  • Best score: 6
  • Best player score: 10
  • Position: #85 / 85
  • Number of attempts: 1
Order and join - 1032 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 12
  • Position: #169 / 265
  • Number of attempts: 2
Collect List - 4342 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 19
  • Position: #1116 / 1200
  • Number of attempts: 2
VimGolfNight - 603 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 21
  • Position: #343 / 356
  • Number of attempts: 1
Mute the second method of this script - 465 entries

prepend a # infront of every line of the second method

  • Best score: 8
  • Best player score: 10
  • Position: #220 / 246
  • Number of attempts: 1
Refactoring useless Method away - 135 entries

Real-life challenge, convert a bunch of ifs to a switch statement

  • Best score: 47
  • Best player score: 113
  • Position: #38 / 38
  • Number of attempts: 2
Condensed Cases - 829 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 21
  • Position: #233 / 255
  • Number of attempts: 1
I forgot quotes - 16239 entries

Oops.

  • Best score: 10
  • Best player score: 20
  • Position: #3664 / 4225
  • Number of attempts: 1
learn vim in short time - 248 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #103 / 168
  • Number of attempts: 2
Change name of a variable - 197 entries

Replace the name of the $variable with the fastest move possible. The challenge is having a command that allow you to easily change the variable name even if its indented.

  • Best score: 9
  • Best player score: 9
  • Position: #104 / 148
  • Number of attempts: 1
Refactor static member invocation - 235 entries

Someone used a static method. Refactor the method into a static import while fixing the assertion.

  • Best score: 28
  • Best player score: 56
  • Position: #66 / 68
  • Number of attempts: 2
Do you demand a shrubbery? - 1208 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 32
  • Position: #291 / 310
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 10758 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 16
  • Position: #3326 / 3717
  • Number of attempts: 1
Words in parens - 13054 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 18
  • Position: #2970 / 3991
  • Number of attempts: 1
abcd > a b c d - 309 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #166 / 231
  • Number of attempts: 1
Python: Lots of function arguments - 129 entries

The function definition is too long for one line. The modeline helps you with some typical Python indent settings.

  • Best score: 6
  • Best player score: 36
  • Position: #53 / 53
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1642 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 14
  • Position: #382 / 457
  • Number of attempts: 2
Vertical Limit - 2637 entries

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

  • Best score: 21
  • Best player score: 27
  • Position: #566 / 778
  • Number of attempts: 1
Append semicolon after expressions - 1087 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 19
  • Position: #418 / 426
  • Number of attempts: 1
switch variable - 5128 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1221 / 1764
  • Number of attempts: 1
The meaning - 588 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #275 / 368
  • Number of attempts: 1
remove dupes from array - 1377 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: 24
  • Position: #237 / 341
  • Number of attempts: 1
Shebangs for all - 2103 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: 18
  • Position: #391 / 533
  • Number of attempts: 2
The Cake is a Lie - 1418 entries

Correct the capitalization of each word

  • Best score: 8
  • Best player score: 9
  • Position: #242 / 543
  • Number of attempts: 2
Context Insensitive completion 1 - 533 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 49
  • Position: #249 / 252
  • Number of attempts: 2
Change the content of a string - 1803 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 27
  • Position: #535 / 656
  • Number of attempts: 1
Simple text editing with Vim - 13645 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1694 / 3907
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 7694 entries

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

  • Best score: 7
  • Best player score: 53
  • Position: #1572 / 1893
  • Number of attempts: 1
Austin Ware
Twitter:

entered into 45 challenges

contributed 0 challenges