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 - 33385 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: #5972 / 7364
  • Number of attempts: 3
V to the i - 4751 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1059 / 1879
  • Number of attempts: 3
Search and Replace 0 - 4792 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1087 / 1585
  • Number of attempts: 2
That hyphen - 2556 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #509 / 695
  • Number of attempts: 6
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #396 / 4164
  • Number of attempts: 7
Python Hello World! Reformatting - 938 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: #228 / 364
  • Number of attempts: 2
Basic renumbering - 5587 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 19
  • Position: #742 / 1258
  • Number of attempts: 3
Vice versa - 7805 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Position: #1695 / 2101
  • Number of attempts: 6
Assign numbers to fields - 105 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: #57 / 59
  • Number of attempts: 4
Mirror Symmetry - 798 entries

Add backslashes.

  • Best score: 7
  • Best player score: 14
  • Position: #227 / 266
  • Number of attempts: 1
Collect List - 4264 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 28
  • Position: #1163 / 1186
  • Number of attempts: 2
camel riding - 769 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 18
  • Position: #224 / 274
  • Number of attempts: 1
Space out the alphabet - 1627 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 27
  • Position: #402 / 440
  • Number of attempts: 2
Pretty format for variable declarations - 155 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #39 / 62
  • Number of attempts: 3
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2472 / 4161
  • Number of attempts: 5
learn vim in short time - 232 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 9
  • Position: #142 / 158
  • Number of attempts: 2
-a-b-c- - 3176 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #932 / 1129
  • Number of attempts: 2
Gray area - 732 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 14
  • Position: #219 / 268
  • Number of attempts: 6
Do you demand a shrubbery? - 1120 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 32
  • Position: #263 / 293
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10628 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 17
  • Position: #3355 / 3667
  • Number of attempts: 3
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 21
  • Position: #3448 / 3946
  • Number of attempts: 3
The name of the game - 650 entries

End up with the name of the game.

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

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

  • Best score: 16
  • Best player score: 43
  • Position: #145 / 163
  • Number of attempts: 2
SFD-ROC: vimvimvim - 1581 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: #218 / 439
  • Number of attempts: 2
Let's play some Ivmgolf - 1091 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 15
  • Position: #428 / 441
  • Number of attempts: 1
switch variable - 5036 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 18
  • Position: #1628 / 1736
  • Number of attempts: 2
Case preserving word replacement - 453 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: #175 / 179
  • Number of attempts: 1
Ruby 1.9 hashes - 1221 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: #276 / 401
  • Number of attempts: 4
Shebangs for all - 1912 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: #347 / 500
  • Number of attempts: 4
A Simple One - 1001 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 / 643
  • Number of attempts: 1
The Cake is a Lie - 1286 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #211 / 512
  • Number of attempts: 5
Change the content of a string - 1476 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 24
  • Position: #324 / 558
  • Number of attempts: 3
Simple text editing with Vim - 12290 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1425 / 3581
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 6560 entries

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

  • Best score: 32
  • Best player score: 48
  • Position: #1265 / 1616
  • Number of attempts: 1
Andrew Michaud
Twitter:

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

entered into 34 challenges

contributed 0 challenges