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 - 32962 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: #5901 / 7276
  • Number of attempts: 3
V to the i - 4641 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1046 / 1857
  • Number of attempts: 3
Search and Replace 0 - 4676 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1059 / 1549
  • Number of attempts: 2
That hyphen - 2500 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 13
  • Position: #501 / 683
  • Number of attempts: 6
Just the middle - 11141 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #396 / 4114
  • Number of attempts: 7
Python Hello World! Reformatting - 906 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: #223 / 352
  • Number of attempts: 2
Basic renumbering - 5436 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 19
  • Position: #722 / 1228
  • Number of attempts: 3
Vice versa - 7535 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Position: #1654 / 2048
  • Number of attempts: 6
Assign numbers to fields - 93 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: #50 / 52
  • Number of attempts: 4
Mirror Symmetry - 781 entries

Add backslashes.

  • Best score: 7
  • Best player score: 14
  • Position: #223 / 262
  • Number of attempts: 1
Collect List - 4184 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 28
  • Position: #1144 / 1167
  • Number of attempts: 2
camel riding - 745 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 18
  • Position: #217 / 267
  • Number of attempts: 1
Space out the alphabet - 1595 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 27
  • Position: #397 / 434
  • Number of attempts: 2
Pretty format for variable declarations - 144 entries

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

  • Best score: 14
  • Best player score: 17
  • Position: #35 / 55
  • Number of attempts: 3
I forgot quotes - 15748 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2436 / 4116
  • Number of attempts: 5
learn vim in short time - 219 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 9
  • Position: #136 / 150
  • Number of attempts: 2
-a-b-c- - 3118 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #916 / 1112
  • Number of attempts: 2
Gray area - 702 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 14
  • Position: #214 / 260
  • Number of attempts: 6
Do you demand a shrubbery? - 1107 entries

Use :redir and crush the emacsgolfers.

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 17
  • Position: #3326 / 3638
  • Number of attempts: 3
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 21
  • Position: #3425 / 3919
  • Number of attempts: 3
The name of the game - 629 entries

End up with the name of the game.

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

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

  • Best score: 16
  • Best player score: 43
  • Position: #141 / 157
  • Number of attempts: 2
SFD-ROC: vimvimvim - 1510 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: #212 / 424
  • Number of attempts: 2
Let's play some Ivmgolf - 1015 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 15
  • Position: #408 / 420
  • Number of attempts: 1
switch variable - 4945 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 18
  • Position: #1605 / 1708
  • Number of attempts: 2
Case preserving word replacement - 436 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: #171 / 175
  • Number of attempts: 1
Ruby 1.9 hashes - 1172 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: #269 / 386
  • Number of attempts: 4
Shebangs for all - 1777 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: #334 / 468
  • Number of attempts: 4
A Simple One - 934 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 / 617
  • Number of attempts: 1
The Cake is a Lie - 1215 entries

Correct the capitalization of each word

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

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 24
  • Position: #297 / 521
  • Number of attempts: 3
Simple text editing with Vim - 11657 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1396 / 3418
  • Number of attempts: 6
Reformat/Refactor a Golfer Class - 6033 entries

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

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

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

entered into 34 challenges

contributed 0 challenges