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

Python Hello World! Reformatting - 897 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: 42
  • Position: #92 / 350
  • Number of attempts: 2
imports alignment (python) - 640 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 20
  • Position: #66 / 191
  • Number of attempts: 7
HTML to Haml - 800 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 44
  • Position: #131 / 197
  • Number of attempts: 4
expand a list comprehension (python) - 276 entries

Please show your way to convert a list comprehension in python to an ordinary for-loop expression!

  • Best score: 42
  • Best player score: 54
  • Position: #53 / 103
  • Number of attempts: 2
Generate English Alphabets - 438 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Position: #95 / 194
  • Number of attempts: 2
The Universal Declaration of Human Rights, Article 1 - 141 entries

Somebody's got this slightly muddled up. See how quickly you can fix it. (I made this to experiment with buffers. I'm not actually sure whether this is faster with buffers or without.)

  • Best score: 24
  • Best player score: 32
  • Position: #60 / 67
  • Number of attempts: 2
Getters & Setters: Java - 190 entries

Boilerplate getters & setters - it's a tedious fact of life in Java, and probably the only thing that still pulls me back to an IDE. Perhaps someone knows a fast, pure vim way...

  • Best score: 89
  • Best player score: 248
  • Position: #52 / 54
  • Number of attempts: 1
Java Array2List - 218 entries

Convert an java array initializer into a list.

  • Best score: 67
  • Best player score: 111
  • Position: #51 / 82
  • Number of attempts: 2
The holy-grail may help - 315 entries

Can you find it in less than 20 strokes, Arthur?

  • Best score: 16
  • Best player score: 16
  • Position: #71 / 194
  • Number of attempts: 2
Ruby 1.9 hashes - 1157 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: 12
  • Position: #18 / 382
  • Number of attempts: 6
Assignment Alignment - 770 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 18
  • Position: #13 / 210
  • Number of attempts: 10
Shebangs for all - 1771 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: 14
  • Position: #198 / 467
  • Number of attempts: 7
A Simple One - 924 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: #174 / 612
  • Number of attempts: 2
82 bottles of beer on the wall - 286 entries

Take them down. (sorry, only 82 bottles because the problem size is limited!)

  • Best score: 107
  • Best player score: 129
  • Position: #63 / 133
  • Number of attempts: 2
Reverse and count - 412 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
  • Position: #53 / 158
  • Number of attempts: 4
Reverse Simple Deletion - 759 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #174 / 429
  • Number of attempts: 1
Increment, increment, increment.... - 568 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #156 / 371
  • Number of attempts: 2
The Cake is a Lie - 1203 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 10
  • Position: #300 / 488
  • Number of attempts: 4
Remove Accent off the Letter - 102 entries

Remove all the accent from extremely accented statements.

  • Best score: 37
  • Best player score: 61
  • Position: #14 / 47
  • Number of attempts: 3
Compile C - 319 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 21
  • Position: #34 / 123
  • Number of attempts: 4
Context Insensitive completion 1 - 427 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 18
  • Position: #62 / 222
  • Number of attempts: 3
Make Fancy Header - 963 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 26
  • Position: #296 / 326
  • Number of attempts: 2
Reformat some Python - 554 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 42
  • Position: #105 / 221
  • Number of attempts: 3
Reformat a C golf submission - 523 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: 32
  • Position: #100 / 194
  • Number of attempts: 4
Change the content of a string - 1350 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #42 / 521
  • Number of attempts: 4
Sort and add attributes - 1191 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 33
  • Position: #56 / 484
  • Number of attempts: 2
Braces or Brackets? - 710 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 50
  • Position: #188 / 253
  • Number of attempts: 2
Simple text editing with Vim - 11637 entries

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

  • Best score: 13
  • Best player score: 34
  • Position: #3217 / 3413
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 6015 entries

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

  • Best score: 32
  • Best player score: 33
  • Position: #173 / 1482
  • Number of attempts: 4
Joost
Twitter:

entered into 29 challenges

contributed 0 challenges