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]

24368 active golfers, 267711 entries, 424 challenges

Open VimGolf challenges

Gray area - 625 entries

It's a golf metaphor or something.

The Cake is a Lie - 1111 entries

Correct the capitalization of each word

Santa's naughty / nice list - 52 entries

Christmas is here and Santa hasn't decided who's naughty or nice yet. He's given a list of names to his programmer friend to quickly split the children into naughty and nice. Hint: There's a hidden pattern that might be familiar.

[Real World] PHP To Markdown - 14 entries

Fun refactoring I had to do in the real world. This presents several challenges: - How to create a table that fits the informations exactly - How to keep track of two informations per line while doing the refactoring - Generate the link from the actual text Have fun!

Two become one - 660 entries

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

Sort and add attributes - 1067 entries

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

Create a table - 233 entries

Convert the given input into a formatted table

Ruby 1.9 hashes - 1046 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!

The D a n k Side of the Moon - 28 entries

You're making a vaporwave cover of The Dark Side of the Moon. So for the tracklisting, you want to: 1. Change the track names to v a p o r c a s e 2. Double the track lengths (since you're slowing them down). Well... let's just double the minutes.

Reconstruct the Sentence - 1016 entries

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

Append semicolon after expressions - 843 entries

Some lines need the semicolon, some don't.

Simple addition - 223 entries

The right side of the equation is already there. We just need the left one now.

Hello ${world} - 205 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

Paragraph sort - 309 entries

My large herbivorous mammals, Vim commands, and POSIX utilities need to be sorted separately.

Stairstep digits - 214 entries

Remove the evens. Double the odds.

Exchanging Quotes - 756 entries

Sometimes you need to exchange a choice of quotes in some code.

Make Fancy Header - 898 entries

Make the header text stand out with surrounding asterisks

snowflake fractal - 26 entries

From step 0 to step 3 of a fractal

Nesting SASS - 213 entries

Move a block inside another block and indent it

Combines all items - 234 entries

For each line that starts with the same number I want to combine its contents

A Simple One - 832 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

Python Hello World! Reformatting - 825 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.

Ugly spreadsheet copy/paste to CSV - 710 entries

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

Replace and keep the case - 335 entries

Replace all instance of plugin and Plugin to device and Device.

Wrap text in quotes - 279 entries

All the blocks of text should be wrapped in quotation marks.

Flodder-challenge - 804 entries

Replace the text the most efficient and win!

Mute the second method of this script - 404 entries

prepend a # infront of every line of the second method

The name of the game - 579 entries

End up with the name of the game.

Remove noise from HTTP log - 599 entries

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

Generate a list of numbers - 238 entries

Please generate list of numbers from 1 to 20.

HTML to Haml - 706 entries

Help convert this HTML page to Haml.

Interactive git rebase changing commands - 144 entries

How to change the action of some commits in git rebase dialog.

Reverse Simple Deletion - 700 entries

You did the simple deletion, now reverse it.

Assignment Alignment - 682 entries

line up the operators. Use spaces, not tabs.

VimGolfNight - 456 entries

Based on "The name of the game".

Happy TvvO - 347 entries

Don’t forget the past, learn from it. Happy New Year.

simple format (3) - 37 entries

reverse two column values!

Lisp Condense - 371 entries

Reduce 4 cons selection operations down to one function call.

Prefixes and suffixes - 485 entries

Generate all prefixes of "vimchallenge", then all suffixes.

Swap assigned value - 489 entries

Simple problem but looking for interesting solutions.

Text to HTML Table - 142 entries

Turn the plain text table to an HTML table.

Braces or Brackets? - 625 entries

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

Angular naming conventions - 262 entries

In angular, a directive name follows the camelCase convention. When the directive is used in an HTML template, the words are instead separated by a dash. Go from to the other the fastest!

120 Degrees - 350 entries

Rotate that triangle.

replace 2nd column blanks with values in same column if blank - 177 entries

Where ,SOMELOGB and ,SOMELOGC replaces each /r carriage return if 2nd column is blank. The replace only happens if 2nd column is blank though and should replace up to the non blank row.

lamb had a little Mary - 464 entries

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

Minimalist Limerick - 448 entries

Reproduce this lovely poem.

Add to end of each line... kinda - 263 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

The meaning - 495 entries

Numbers are fun!

readability - 285 entries

Make the code readable by adding some spaces

VimGolf Chatter