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]

22739 active golfers, 238326 entries, 395 challenges

Open VimGolf challenges

Align commas - 734 entries

There are 15,000 aligning challenges on vimgolf.com, and they're all exactly the same. I hope this one is a little different.

Switch function arguments - 1771 entries

How to switch two arguments of a function.

Letter case trickery - 1403 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.

Scrambled numbers - 681 entries

Four is NOT 1. One is 1.

Make it more readable - 1703 entries

Insert blank lines to make it more organized and readable

C Reformatting - 559 entries

You may use Visual mode... or not. #uppercase

Make HTML List - 799 entries

Turn the comma separated list into an unordered html list.

Fix the XML - 821 entries

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

Array propagate - 206 entries

Complete the array with the keys as part of the value

Do you demand a shrubbery? - 963 entries

Use :redir and crush the emacsgolfers.

Numbering a List - 1684 entries

Pretty simple, number the list.

Count both ways - 846 entries

Right AND down.

Remember VimGolf Rules ! - 177 entries

Rules, ... and don't forget !

SFD-ROC: vimvimvim - 1235 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

Mirror Symmetry - 676 entries

Add backslashes.

Todo list specification - 272 entries

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

Shebangs for all - 1550 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

Mess in revision history - 919 entries

Help Joe clean up what Steve has cobbled.

camel riding - 668 entries

add a prefix on some camelCase variables

From A to B - 477 entries

Mirror and change this text block

Where should I put the Newline? - 781 entries

Help me put the newline.

Hole-in-one - 929 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.

Paragraph breaks - 377 entries

Swap the blank lines and the aaa lines.

remove dupes from array - 1158 entries

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

On Being Stylish - 41 entries

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

Condensed Cases - 656 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.

Alsa configuration - 439 entries

I'm tweaking my ~/.asoundrc file!

Create a table - 207 entries

Convert the given input into a formatted table

Change the content of a string - 1195 entries

This docstring is a complete lie. Fix it.

Gray area - 602 entries

It's a golf metaphor or something.

Simple addition - 208 entries

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

Hello ${world} - 194 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

Let's play some Ivmgolf - 856 entries

Oops, I spelled that wrong.

The Cake is a Lie - 1099 entries

Correct the capitalization of each word

Two become one - 631 entries

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

Sort and add attributes - 1043 entries

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

Stairstep digits - 193 entries

Remove the evens. Double the odds.

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

Append semicolon after expressions - 821 entries

Some lines need the semicolon, some don't.

Reconstruct the Sentence - 995 entries

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

Nesting SASS - 192 entries

Move a block inside another block and indent it

Paragraph sort - 288 entries

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

Combines all items - 222 entries

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

Make Fancy Header - 874 entries

Make the header text stand out with surrounding asterisks

Wrap text in quotes - 264 entries

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

Exchanging Quotes - 725 entries

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

Interactive git rebase changing commands - 133 entries

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

Replace and keep the case - 319 entries

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

Mute the second method of this script - 393 entries

prepend a # infront of every line of the second method

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

VimGolf Chatter