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

The Universal Declaration of Human Rights, Article 1 - 128 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
  • Number of attempts: 2
Python Hello World! Reformatting - 859 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
  • Number of attempts: 2
HTML to Haml - 757 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 44
  • Number of attempts: 4
The holy-grail may help - 302 entries

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

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 2
Sort and add attributes - 1113 entries

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

  • Best score: 33
  • Best player score: 33
  • Number of attempts: 2
Remove Accent off the Letter - 100 entries

Remove all the accent from extremely accented statements.

  • Best score: 37
  • Best player score: 61
  • Number of attempts: 3
82 bottles of beer on the wall - 280 entries

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

  • Best score: 107
  • Best player score: 129
  • Number of attempts: 2
Getters & Setters: Java - 158 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
  • Number of attempts: 1
imports alignment (python) - 584 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 20
  • Number of attempts: 7
Make Fancy Header - 929 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 26
  • Number of attempts: 2
Compile C - 280 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 21
  • Number of attempts: 4
Assignment Alignment - 722 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 10
Ruby 1.9 hashes - 1111 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
  • Number of attempts: 6
A Simple One - 854 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
  • Number of attempts: 2
Generate English Alphabets - 425 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Number of attempts: 2
Reverse Simple Deletion - 732 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 1
Reformat a C golf submission - 488 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
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 5692 entries

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

  • Best score: 32
  • Best player score: 33
  • Number of attempts: 4
expand a list comprehension (python) - 252 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
  • Number of attempts: 2
Java Array2List - 216 entries

Convert an java array initializer into a list.

  • Best score: 67
  • Best player score: 111
  • Number of attempts: 2
Increment, increment, increment.... - 515 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 2
Braces or Brackets? - 644 entries

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

  • Best score: 34
  • Best player score: 50
  • Number of attempts: 2
Simple text editing with Vim - 11054 entries

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

  • Best score: 13
  • Best player score: 34
  • Number of attempts: 2
Reformat some Python - 519 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 42
  • Number of attempts: 3
Change the content of a string - 1267 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 4
Reverse and count - 382 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
  • Number of attempts: 4
Shebangs for all - 1669 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
  • Number of attempts: 7
The Cake is a Lie - 1166 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 4
Context Insensitive completion 1 - 399 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 3
Joost
Twitter:

entered into 29 challenges

contributed 0 challenges