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]

25054 active golfers, 278083 entries, 436 challenges

Open VimGolf challenges

From A to B - 493 entries

Mirror and change this text block

Condensed Cases - 692 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

Array propagate - 234 entries

Complete the array with the keys as part of the value

Change the content of a string - 1234 entries

This docstring is a complete lie. Fix it.

Todo list specification - 293 entries

The every item on the todo list must be done today. Modify the list to reflect that.

Paragraph breaks - 402 entries

Swap the blank lines and the aaa lines.

Let's play some Ivmgolf - 909 entries

Oops, I spelled that wrong.

Alsa configuration - 466 entries

I'm tweaking my ~/.asoundrc file!

Gray area - 634 entries

It's a golf metaphor or something.

The Cake is a Lie - 1119 entries

Correct the capitalization of each word

Remember VimGolf Rules ! - 202 entries

Rules, ... and don't forget !

Two become one - 675 entries

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

Sort and add attributes - 1082 entries

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

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!

Create a table - 243 entries

Convert the given input into a formatted table

Reconstruct the Sentence - 1024 entries

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

Append semicolon after expressions - 852 entries

Some lines need the semicolon, some don't.

Santa's naughty / nice list - 65 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.

Simple addition - 233 entries

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

Hello ${world} - 223 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

Paragraph sort - 322 entries

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

Make Fancy Header - 909 entries

Make the header text stand out with surrounding asterisks

Exchanging Quotes - 759 entries

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

Stairstep digits - 217 entries

Remove the evens. Double the odds.

Kolakoski sequence -- level 1 - 36 entries

Generate the Kolakoski sequence as described by its first 75 terms.

Nesting SASS - 220 entries

Move a block inside another block and indent it

A Simple One - 840 entries

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

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.

Ugly spreadsheet copy/paste to CSV - 725 entries

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

Simple Maths 2 - 11 entries

Time to practice expression register! #maths #linear

Combines all items - 239 entries

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

Replace and keep the case - 342 entries

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

Flodder-challenge - 807 entries

Replace the text the most efficient and win!

Wrap text in quotes - 286 entries

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

Mute the second method of this script - 411 entries

prepend a # infront of every line of the second method

The name of the game - 582 entries

End up with the name of the game.

HTML to Haml - 719 entries

Help convert this HTML page to Haml.

Remove noise from HTTP log - 603 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 - 249 entries

Please generate list of numbers from 1 to 20.

Reverse Simple Deletion - 710 entries

You did the simple deletion, now reverse it.

Assignment Alignment - 695 entries

line up the operators. Use spaces, not tabs.

Interactive git rebase changing commands - 151 entries

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

Happy TvvO - 354 entries

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

VimGolfNight - 458 entries

Based on "The name of the game".

Lisp Condense - 378 entries

Reduce 4 cons selection operations down to one function call.

Prefixes and suffixes - 496 entries

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

Swap assigned value - 496 entries

Simple problem but looking for interesting solutions.

snowflake fractal - 31 entries

From step 0 to step 3 of a fractal

lamb had a little Mary - 485 entries

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

Braces or Brackets? - 626 entries

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

VimGolf Chatter