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 - 243 entries

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

  • Best score: 107
  • Best player score: 133
  • Number of attempts: 1
Java Array2List - 214 entries

Convert an java array initializer into a list.

  • Best score: 67
  • Best player score: 85
  • Number of attempts: 3
formatted text to markdown - 173 entries

You're converting some posts from an old blog to markdown. The formatted text is far closer to the finished product than the html markup, so it seems like a good place to start. Word wrapping seems to be the main area for optimization.

  • Best score: 70
  • Best player score: 77
  • Number of attempts: 2
HTML to Haml - 719 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 33
  • Number of attempts: 3
Sort and add attributes - 1082 entries

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

  • Best score: 33
  • Best player score: 33
  • Number of attempts: 2
Reformat most common surnames - 520 entries

Reformat copy-pasted table into a list of the most common surnames

  • Best score: 23
  • Best player score: 35
  • Number of attempts: 1
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: 3
Rotating Philosophers Problem - 358 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: 30
  • Number of attempts: 1
Table Reshuffle - 325 entries

Fix the column order in this table... also append the new 'username' column.

  • Best score: 22
  • Best player score: 29
  • Number of attempts: 3
Another Mixed-Up Haiku - 196 entries

VimGolf ... a perfect evening?

  • Best score: 21
  • Best player score: 28
  • Number of attempts: 1
Reformat some Python - 511 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 39
  • Number of attempts: 4
Letters are numbers - 123 entries

Letters and numbers are interchangeable. A lot of programming languages give you simple ways to convert individual letters to hex, binary and decimal but does Vim?

  • Best score: 20
  • Best player score: 26
  • Number of attempts: 3
PEP8 Python Wrapping Comments and Code - 155 entries

According to PEP8, long flowy text and code should have different max line lengths. Code: 79 characters max Long flowy text: 72 characters max

  • Best score: 23
  • Best player score: 26
  • Number of attempts: 3
Multiplication table. - 171 entries

Create a multiplication table.

  • Best score: 31
  • Best player score: 52
  • Number of attempts: 2
expand a list comprehension (python) - 240 entries

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

  • Best score: 42
  • Best player score: 42
  • Number of attempts: 9
Flodder-challenge - 807 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 37
  • Number of attempts: 3
Make Fancy Header - 909 entries

Make the header text stand out with surrounding asterisks

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 4
Sort the cardinal numbers - 215 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
Line Zipper - 396 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Number of attempts: 2
Change the content of a string - 1234 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 3
Shebangs for all - 1588 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: 12
  • Number of attempts: 6
Ruby 1.9 compat - 557 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: 14
  • Number of attempts: 2
Ruby 1.9 hashes - 1069 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: 7
Wrap the text of an email message to 79 characters - 486 entries

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

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

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 4
Search and Replace 0 - 4091 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 4
Interweave two blocks of text - 486 entries

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

  • Best score: 15
  • Best player score: 17
  • Number of attempts: 1
Increment, increment, increment.... - 488 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 1
Numbering a List - 1727 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Number of attempts: 5
imports alignment (python) - 577 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 17
  • Number of attempts: 1
Context insensitive completion 0 - 444 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: 7
  • Best player score: 7
  • Number of attempts: 4
Context Insensitive completion 1 - 394 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 19
  • Number of attempts: 1
Case preserving word replacement - 385 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: 19
  • Number of attempts: 2
Replacing some words - 400 entries

How fast could it be?

  • Best score: 17
  • Best player score: 20
  • Number of attempts: 3
Deleting folded text - 274 entries

The text below contains three folds. Delete them (and the text inside them). For example: 123 456 /*{{{*/ 789 /*}}}*/ 012 Should become: 123 012 Also, add `aoeuaoeu` to make sure small solutions don't get flagged as cheating.

  • Best score: 17
  • Best player score: 21
  • Number of attempts: 1
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: 43
  • 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: 1
Python Hello World! Reformatting - 832 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
  • Number of attempts: 1
Complete the hex array data (Part II) - 123 entries

Do not use external tools(e.g. tac, seq) [My interpretation of Rule #7]

  • Best score: 20
  • Best player score: 22
  • Number of attempts: 1
Recursively Palindrome - 220 entries

Note that there are 2^6-1 characters.

  • Best score: 21
  • Best player score: 24
  • Number of attempts: 4
xhtmlforum
Twitter:

XHTMLforum - german (X)HTML / CSS community

entered into 40 challenges

contributed 0 challenges