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

Write Setters and Getters for PHP - 86 entries

Just simple automation of writing Setters and Getters like Doctrine might use.

  • Best score: 102
  • Best player score: 166
  • Number of attempts: 1
The name of the game - 587 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 1
quotes inside quotes - 2834 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 17
  • Number of attempts: 1
Wrap the text of an email message to 79 characters - 495 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
Hole-in-one - 941 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 19
  • Number of attempts: 1
Reconstruct the Sentence - 1028 entries

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

  • Best score: 20
  • Best player score: 21
  • Number of attempts: 3
Five Pillars - 43 entries

Arrange all words in a table with 5 columns. The minimal space between words in columns is 2 spaces. Columns do have varying width.

  • Best score: 41
  • Best player score: 57
  • Number of attempts: 3
remove dupes from array - 1220 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 18
  • Number of attempts: 4
lamb had a little Mary - 499 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 32
  • Number of attempts: 4
camel riding - 697 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 4
Make it more readable - 1769 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 4
Ruby 1.9 hashes - 1086 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: 14
  • Number of attempts: 2
Simple text editing with Vim - 10668 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 3
Remove noise from HTTP log - 618 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 2
Just the middle - 9664 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 2
A HAPPY NEW YEAR 2014 ! - 9715 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 5
readability - 285 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 21
  • Number of attempts: 1
Search and Replace 0 - 4206 entries

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

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 5
Shuffled numbers - 199 entries

Each number is paired with the number it should follow. That's enough information to put them in order.

  • Best score: 15
  • Best player score: 19
  • Number of attempts: 1
Letter case trickery - 1450 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 12
  • Number of attempts: 2
V to the i - 4104 entries

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

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 1
switch variable - 4443 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 2
Make the circuit grid! - 71 entries

Copy this command for a circuit layout program to create 10 total smd commands. Increment the number in quotes to name each pad, and add 0.7 to each of the (X Y) coordinates at the end of each line.

  • Best score: 26
  • Best player score: 26
  • Number of attempts: 2
NBCU Weekly Challenge - Test - 221 entries

Just testing.

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 2
-a-b-c- - 2689 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 4
Swap assigned value - 499 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 11
  • Number of attempts: 1
Words in parens - 11368 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 21
  • 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: 38
  • Number of attempts: 2
Mess in revision history - 1001 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 22
  • Number of attempts: 4
Switch function arguments - 1852 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 3
Vertical Limit - 2167 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 26
  • Number of attempts: 2
Count both ways - 887 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 2
O Christmas Tree - 99 entries

Design a macro that makes trees grow (or ASCII triangles, if that's too hard).

  • Best score: 22
  • Best player score: 29
  • Number of attempts: 2
Piphilology - 122 entries

Piphilology comprises the creation and use of mnemonic techniques to remember a span of digits of the mathematical constant π. http://en.wikipedia.org/wiki/Piphilology

  • Best score: 29
  • Best player score: 48
  • Number of attempts: 2
Fix the XML - 884 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 30
  • Number of attempts: 1
Two become one - 676 entries

We have two c arrays and want to make one two dimensional out of it. Can we do that?

  • Best score: 25
  • Best player score: 30
  • Number of attempts: 1
Simple, Practical, and Common - 26754 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: 33
  • Number of attempts: 1
Saving the hashes(#) - 1806 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 29
  • Number of attempts: 2
replacing each line of a block selection - 2591 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 31
  • Number of attempts: 1
I forgot quotes - 12699 entries

Oops.

  • Best score: 10
  • Best player score: 19
  • Number of attempts: 1
Minimalist Limerick - 481 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 31
  • Number of attempts: 5
Going underground.... - 291 entries

Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...

  • Best score: 22
  • Best player score: 31
  • Number of attempts: 3
Top X - 181 entries

The End File is the Top 10 Vimgolf Leaderboard at June 29, 2013. This is a second version, with a great contribution of @udioica. X is ten in Roman,a numeric system in ancient Rome

  • Best score: 18
  • Best player score: 26
  • Number of attempts: 1
Ugly spreadsheet copy/paste to CSV - 731 entries

convert an ugly spreadsheet copy/paste into a CSV format.

  • Best score: 19
  • Best player score: 50
  • Number of attempts: 1
attr_aligner - 3075 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 32
  • Number of attempts: 1
Flodder-challenge - 814 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 36
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 5569 entries

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

  • Best score: 32
  • Best player score: 41
  • Number of attempts: 2
Brian Olpin
Twitter:

entered into 47 challenges

contributed 0 challenges