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 - 34031 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: 33
  • Position: #6077 / 7520
  • Number of attempts: 3
V to the i - 4890 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1076 / 1917
  • Number of attempts: 3
Search and Replace 0 - 5170 entries

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

  • Best score: 7
  • Best player score: 15
  • Position: #1158 / 1680
  • Number of attempts: 2
That hyphen - 2650 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #518 / 713
  • Number of attempts: 6
Just the middle - 11636 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #396 / 4262
  • Number of attempts: 7
Python Hello World! Reformatting - 1057 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 44
  • Position: #247 / 402
  • Number of attempts: 2
Basic renumbering - 5735 entries

Renumbering Basic.

  • Best score: 7
  • Best player score: 19
  • Position: #761 / 1282
  • Number of attempts: 3
Vice versa - 8021 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Position: #1736 / 2158
  • Number of attempts: 6
Assign numbers to fields - 123 entries

You are given a list of space-separated strings. Add an increasing numeric prefix to each one.

  • Best score: 19
  • Best player score: 47
  • Position: #63 / 65
  • Number of attempts: 4
Mirror Symmetry - 845 entries

Add backslashes.

  • Best score: 7
  • Best player score: 14
  • Position: #234 / 273
  • Number of attempts: 1
Collect List - 4342 entries

Convert to comma separated list.

  • Best score: 7
  • Best player score: 28
  • Position: #1176 / 1200
  • Number of attempts: 2
camel riding - 817 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 18
  • Position: #232 / 285
  • Number of attempts: 1
Space out the alphabet - 1700 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 27
  • Position: #417 / 460
  • Number of attempts: 2
Pretty format for variable declarations - 188 entries

Project standards demand the equal signs must be aligned for better readability.

  • Best score: 13
  • Best player score: 17
  • Position: #45 / 70
  • Number of attempts: 3
I forgot quotes - 16255 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2512 / 4229
  • Number of attempts: 5
learn vim in short time - 248 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 9
  • Position: #149 / 168
  • Number of attempts: 2
-a-b-c- - 3243 entries

Put hyphens everywhere.

  • Best score: 6
  • Best player score: 17
  • Position: #949 / 1148
  • Number of attempts: 2
Gray area - 765 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 14
  • Position: #225 / 277
  • Number of attempts: 6
Do you demand a shrubbery? - 1208 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 32
  • Position: #275 / 310
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10757 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 17
  • Position: #3400 / 3717
  • Number of attempts: 3
Words in parens - 13063 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 21
  • Position: #3488 / 3995
  • Number of attempts: 3
The name of the game - 707 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #195 / 374
  • Number of attempts: 3
lamb had a little Mary - 661 entries

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

  • Best score: 16
  • Best player score: 43
  • Position: #155 / 181
  • Number of attempts: 2
SFD-ROC: vimvimvim - 1643 entries

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

  • Best score: 8
  • Best player score: 9
  • Position: #224 / 458
  • Number of attempts: 2
Let's play some Ivmgolf - 1167 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 15
  • Position: #448 / 462
  • Number of attempts: 1
switch variable - 5136 entries

how fast can you switch two variable ?

  • Best score: 9
  • Best player score: 18
  • Position: #1652 / 1767
  • Number of attempts: 2
Case preserving word replacement - 477 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

  • Best score: 19
  • Best player score: 37
  • Position: #182 / 186
  • Number of attempts: 1
Ruby 1.9 hashes - 1315 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 12
  • Best player score: 15
  • Position: #289 / 421
  • Number of attempts: 4
Shebangs for all - 2105 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: 17
  • Position: #367 / 534
  • Number of attempts: 4
A Simple One - 1096 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #413 / 683
  • Number of attempts: 1
The Cake is a Lie - 1422 entries

Correct the capitalization of each word

  • Best score: 8
  • Best player score: 9
  • Position: #212 / 546
  • Number of attempts: 5
Change the content of a string - 1810 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 24
  • Position: #390 / 659
  • Number of attempts: 3
Simple text editing with Vim - 13682 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1506 / 3920
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 7737 entries

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

  • Best score: 7
  • Best player score: 48
  • Position: #1421 / 1901
  • Number of attempts: 1
Andrew Michaud
Twitter:

Programmer jerk, Linux jerk, anime jerk, jerk jerk. (He/him)

entered into 34 challenges

contributed 0 challenges