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

82 bottles of beer on the wall - 257 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
Java Array2List - 214 entries

Convert an java array initializer into a list.

  • Best score: 67
  • Best player score: 111
  • Number of attempts: 2
HTML to Haml - 722 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 44
  • Number of attempts: 4
Assignment Alignment - 695 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 10
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
Braces or Brackets? - 626 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
Compile C - 278 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 21
  • Number of attempts: 4
Context Insensitive completion 1 - 395 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 3
The holy-grail may help - 301 entries

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

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 2
Shebangs for all - 1595 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
Ruby 1.9 hashes - 1077 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
Sort and add attributes - 1089 entries

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

  • Best score: 33
  • Best player score: 33
  • Number of attempts: 2
The Cake is a Lie - 1126 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 4
Simple text editing with Vim - 10474 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
Increment, increment, increment.... - 489 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 2
Reverse Simple Deletion - 714 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 1
Getters & Setters: Java - 141 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) - 577 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 20
  • Number of attempts: 7
Reverse and count - 379 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
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 - 836 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
Change the content of a string - 1237 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 4
Generate English Alphabets - 413 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 25
  • Number of attempts: 2
expand a list comprehension (python) - 247 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
Make Fancy Header - 917 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 26
  • Number of attempts: 2
A Simple One - 845 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
Reformat a C golf submission - 476 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: 23
  • Best player score: 32
  • Number of attempts: 4
Reformat some Python - 511 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 42
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 5518 entries

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

  • Best score: 32
  • Best player score: 33
  • Number of attempts: 4
Joost
Twitter:

entered into 29 challenges

contributed 0 challenges