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]

23493 active golfers, 251888 entries, 409 challenges

Open VimGolf challenges

Reconstruct the Sentence - 1010 entries

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

Stairstep digits - 208 entries

Remove the evens. Double the odds.

Paragraph sort - 305 entries

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

Nesting SASS - 208 entries

Move a block inside another block and indent it

Combines all items - 231 entries

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

Exchanging Quotes - 746 entries

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

Make Fancy Header - 891 entries

Make the header text stand out with surrounding asterisks

Wrap text in quotes - 276 entries

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

Replace and keep the case - 330 entries

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

A Simple One - 828 entries

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

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

Mute the second method of this script - 404 entries

prepend a # infront of every line of the second method

On Being Stylish - 50 entries

Your PR cannot be accepted if you don't follow our corporate style guide.

Ugly spreadsheet copy/paste to CSV - 696 entries

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

Flodder-challenge - 804 entries

Replace the text the most efficient and win!

Interactive git rebase changing commands - 142 entries

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

Generate a list of numbers - 235 entries

Please generate list of numbers from 1 to 20.

The name of the game - 579 entries

End up with the name of the game.

Remove noise from HTTP log - 597 entries

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

Reverse Simple Deletion - 698 entries

You did the simple deletion, now reverse it.

Text to HTML Table - 142 entries

Turn the plain text table to an HTML table.

HTML to Haml - 683 entries

Help convert this HTML page to Haml.

Happy TvvO - 344 entries

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

VimGolfNight - 451 entries

Based on "The name of the game".

Assignment Alignment - 659 entries

line up the operators. Use spaces, not tabs.

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.

Lisp Condense - 364 entries

Reduce 4 cons selection operations down to one function call.

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!

Swap assigned value - 489 entries

Simple problem but looking for interesting solutions.

Add Go XML to structure tags - 127 entries

The Go programming language can directly map XML to structure fields. Add the correct XML tag after each field.

Prefixes and suffixes - 473 entries

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

120 Degrees - 349 entries

Rotate that triangle.

Braces or Brackets? - 625 entries

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

Pretty multi-line bash - 194 entries

Bash line continuations are much prettier when they're column aligned.

Separate the lines - 125 entries

Every other line is mixed up. Separate them into their original texts.

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?

readability - 285 entries

Make the code readable by adding some spaces

Line 'em up! - 275 entries

It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!

Minimalist Limerick - 448 entries

Reproduce this lovely poem.

lamb had a little Mary - 453 entries

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

The meaning - 489 entries

Numbers are fun!

ASCII box - 287 entries

Don't forget to fix typos!

lipsum lines - 233 entries

Convert a quoted block of text into strings in a list.

imports alignment (python) - 571 entries

Align as one import per line.

Reverse characters in a line - 554 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

Ruby 1.9 compat - 545 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!

Logging with key - 264 entries

Sometimes it is better to log with meaningful key

vim = 22 / 7 - 392 entries

pi square vim

Remove semicolons after expressions - 432 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

Un"finnish"ed Work - 99 entries

Replace å by a, ä by a and ö by o.

VimGolf Chatter