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]

24030 active golfers, 261435 entries, 422 challenges

Open VimGolf challenges

Remember VimGolf Rules ! - 187 entries

Rules, ... and don't forget !

Alsa configuration - 458 entries

I'm tweaking my ~/.asoundrc file!

Gray area - 619 entries

It's a golf metaphor or something.

Let's play some Ivmgolf - 881 entries

Oops, I spelled that wrong.

The Cake is a Lie - 1109 entries

Correct the capitalization of each word

Two become one - 660 entries

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

Create a table - 228 entries

Convert the given input into a formatted table

Sort and add attributes - 1061 entries

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

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!

Simple addition - 223 entries

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

Append semicolon after expressions - 843 entries

Some lines need the semicolon, some don't.

Reconstruct the Sentence - 1016 entries

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

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

Remove the evens. Double the odds.

Nesting SASS - 213 entries

Move a block inside another block and indent it

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

Combines all items - 234 entries

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

A Simple One - 831 entries

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

Wrap text in quotes - 279 entries

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

Replace and keep the case - 335 entries

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

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

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

simple format (3) - 37 entries

reverse two column values!

The name of the game - 579 entries

End up with the name of the game.

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.

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.

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

line up the operators. Use spaces, not tabs.

Text to HTML Table - 142 entries

Turn the plain text table to an HTML table.

Lisp Condense - 364 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.

On Being Stylish - 50 entries

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

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!

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.

Braces or Brackets? - 625 entries

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

120 Degrees - 350 entries

Rotate that triangle.

lamb had a little Mary - 464 entries

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

Pretty multi-line bash - 194 entries

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

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?

readability - 285 entries

Make the code readable by adding some spaces

VimGolf Chatter