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 - 33700 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: 27
  • Position: #3854 / 7436
  • Number of attempts: 5
V to the i - 4813 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1225 / 1897
  • Number of attempts: 3
Wrap the text of an email message to 79 characters - 796 entries

You're replying to an email with silly long lines. Clean them up.

  • Best score: 5
  • Best player score: 5
  • Position: #57 / 418
  • Number of attempts: 1
Search and Replace 0 - 5002 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1098 / 1629
  • Number of attempts: 3
Just the middle - 11477 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2422 / 4206
  • Number of attempts: 2
Python Hello World! Reformatting - 1000 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: 43
  • Position: #149 / 382
  • Number of attempts: 3
Rotating Philosophers Problem - 410 entries

Can you help the philosophers find a good place to sit before they get five forks and spaghetti?

  • Best score: 29
  • Best player score: 31
  • Position: #92 / 166
  • Number of attempts: 3
A Simple One - 1057 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: #204 / 667
  • Number of attempts: 2
Another Mixed-Up Haiku - 265 entries

VimGolf ... a perfect evening?

  • Best score: 21
  • Best player score: 35
  • Position: #81 / 90
  • Number of attempts: 2
Ruby 1.9 compat - 634 entries

Remember when Ruby supported `when <expr> :`? Well, it doesn't in 1.9, so let's make sure we use `then`, without ruining our lovely new hash syntax!

  • Best score: 14
  • Best player score: 17
  • Position: #146 / 235
  • Number of attempts: 2
Reverse Simple Deletion - 854 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 13
  • Position: #383 / 460
  • Number of attempts: 1
Hatsuyume - 540 entries

http://en.wikipedia.org/wiki/Hatsuyume

  • Best score: 15
  • Best player score: 27
  • Position: #105 / 187
  • Number of attempts: 3
Fix the Haiku - 313 entries

Change this slightly scrambled haiku to its unscrambled form and fix the capitalisation and punctuation along the way.

  • Best score: 28
  • Best player score: 41
  • Position: #62 / 114
  • Number of attempts: 4
Context insensitive completion 0 - 585 entries

Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.

  • Best score: 6
  • Best player score: 8
  • Position: #136 / 248
  • Number of attempts: 4
Context Insensitive completion 1 - 506 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 45
  • Position: #241 / 247
  • Number of attempts: 1
Make Fancy Header - 1059 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 28
  • Position: #324 / 345
  • Number of attempts: 1
Reformat some Python - 622 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 39
  • Position: #85 / 238
  • Number of attempts: 5
Reformat a C golf submission - 612 entries

Take this C golf submission (for the "tiny but standards-compliant Hello World program" category, naturally), and turn it into formatted C code.

  • Best score: 22
  • Best player score: 34
  • Position: #132 / 209
  • Number of attempts: 2
Reverse characters in a line - 776 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 15
  • Position: #126 / 267
  • Number of attempts: 2
Change the content of a string - 1591 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 26
  • Position: #402 / 593
  • Number of attempts: 1
Add fold markers to a .c file - 660 entries

Fold markers can make it easier to navigate source code. Add them to this .c file.

  • Best score: 30
  • Best player score: 46
  • Position: #155 / 189
  • Number of attempts: 2
Reconstruct the Sentence - 1575 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 19
  • Best player score: 26
  • Position: #363 / 423
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3724 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 22
  • Position: #281 / 800
  • Number of attempts: 6
Simple text editing with Vim - 12925 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #2163 / 3722
  • Number of attempts: 3
Rolf K.
Twitter:

reader, writer, thinker, listener, player

entered into 24 challenges

contributed 0 challenges