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

Split the words - 334 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

  • Best score: 18
  • Best player score: 36
  • Number of attempts: 4
attr_aligner - 2847 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 32
  • Number of attempts: 2
Replace and keep the case - 330 entries

Replace all instance of plugin and Plugin to device and Device.

  • Best score: 26
  • Best player score: 27
  • Number of attempts: 4
O Christmas Tree - 99 entries

Design a macro that makes trees grow (or ASCII triangles, if that's too hard).

  • Best score: 22
  • Best player score: 25
  • Number of attempts: 6
Simple, Practical, and Common - 22752 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: 2
  • Best player score: 22
  • Number of attempts: 7
Vertical Limit - 2063 entries

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

  • Best score: 21
  • Best player score: 22
  • Number of attempts: 6
Fill visual area - 70 entries

Just have fun!

  • Best score: 20
  • Best player score: 20
  • Number of attempts: 5
Minimalist Limerick - 448 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 34
  • Number of attempts: 1
replacing each line of a block selection - 2440 entries

replace each line's ../assets/js with /javascripts

  • Best score: 17
  • Best player score: 20
  • Number of attempts: 7
Vim tetris - 314 entries

Vim can play tetris too!

  • Best score: 21
  • Best player score: 23
  • Number of attempts: 3
From A to B - 487 entries

Mirror and change this text block

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 5
Count both ways - 854 entries

Right AND down.

  • Best score: 13
  • Best player score: 17
  • Number of attempts: 2
lamb had a little Mary - 464 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 32
  • Number of attempts: 6
Reverse and count - 378 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

  • Best score: 18
  • Best player score: 24
  • Number of attempts: 6
camel riding - 678 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 5
Do you demand a shrubbery? - 988 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 10
switch variable - 4189 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 12
  • Number of attempts: 4
V to the i - 3693 entries

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

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 2
-a-b-c- - 2474 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 5
JS notation to Immutable.js notation - 137 entries

Now Immutable.js made its way into many frontends. This challenge consists of a typical refactoring that many of us are facing now.

  • Best score: 35
  • Best player score: 46
  • Number of attempts: 1
The name of the game - 579 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
comments galore - 883 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 2
Collect List - 3308 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 15
  • Number of attempts: 3
The Cake is a Lie - 1106 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
un-C-escape string - 53 entries

Convert escape sequences to characters

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 1
Just the middle - 8773 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 3
readability - 285 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 19
  • Number of attempts: 1
Remove noise from HTTP log - 597 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 4
Search and Replace 0 - 3921 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 6
A HAPPY NEW YEAR 2014 ! - 9280 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
I forgot quotes - 10876 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 4
Stairs Indenting - 359 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
Adam's challenge - 694 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: 18
  • Number of attempts: 3
Simple text editing with Vim - 10134 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 3
Add to end of each line... kinda - 263 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
Letter case trickery - 1416 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 12
  • Number of attempts: 2
Vice versa - 5630 entries

Little role switching.

  • Best score: 2
  • Best player score: 14
  • Number of attempts: 4
Assign list - 145 entries

Assign list elements to matrix

  • Best score: 30
  • Best player score: 49
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 5391 entries

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

  • Best score: 32
  • Best player score: 42
  • Number of attempts: 2
Every other line - 1937 entries

AaAaAaA

  • Best score: 12
  • Best player score: 20
  • Number of attempts: 2
abcd > a b c d - 239 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 2
quotes inside quotes - 2684 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: 2
  • Best player score: 14
  • Number of attempts: 5
Shebangs for all - 1568 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: 16
  • Number of attempts: 2
Mirrored text - 153 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 5
VimGolfNight - 451 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
One number per line - 11399 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 3
Domingue Justin
Twitter:

entered into 46 challenges

contributed 0 challenges