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]

22919 active golfers, 242016 entries, 397 challenges

Open VimGolf challenges

comments galore - 870 entries

Basic comment reformatting

Align commas - 760 entries

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

Saving the hashes(#) - 1686 entries

The following file is copied from only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

Switch function arguments - 1785 entries

How to switch two arguments of a function.

Letter case trickery - 1413 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 - 696 entries

Four is NOT 1. One is 1.

C Reformatting - 580 entries

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

Make it more readable - 1718 entries

Insert blank lines to make it more organized and readable

Make HTML List - 812 entries

Turn the comma separated list into an unordered html list.

Fix the XML - 827 entries

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

Do you demand a shrubbery? - 976 entries

Use :redir and crush the emacsgolfers.

Numbering a List - 1698 entries

Pretty simple, number the list.

Array propagate - 209 entries

Complete the array with the keys as part of the value

Count both ways - 850 entries

Right AND down.

SFD-ROC: vimvimvim - 1241 entries

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

Mirror Symmetry - 681 entries

Add backslashes.

Mess in revision history - 927 entries

Help Joe clean up what Steve has cobbled.

Shebangs for all - 1552 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.

Remember VimGolf Rules ! - 180 entries

Rules, ... and don't forget !

Todo list specification - 274 entries

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

camel riding - 673 entries

add a prefix on some camelCase variables

From A to B - 480 entries

Mirror and change this text block

Where should I put the Newline? - 782 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 - 381 entries

Swap the blank lines and the aaa lines.

remove dupes from array - 1164 entries

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

Condensed Cases - 667 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 - 448 entries

I'm tweaking my ~/.asoundrc file!

Create a table - 215 entries

Convert the given input into a formatted table

Change the content of a string - 1204 entries

This docstring is a complete lie. Fix it.

Gray area - 611 entries

It's a golf metaphor or something.

Simple addition - 213 entries

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

Hello ${world} - 198 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

Let's play some Ivmgolf - 861 entries

Oops, I spelled that wrong.

The Cake is a Lie - 1104 entries

Correct the capitalization of each word

Two become one - 644 entries

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

On Being Stylish - 41 entries

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

Sort and add attributes - 1052 entries

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

Stairstep digits - 202 entries

Remove the evens. Double the odds.

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

Nesting SASS - 204 entries

Move a block inside another block and indent it

Append semicolon after expressions - 826 entries

Some lines need the semicolon, some don't.

Reconstruct the Sentence - 1004 entries

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

Paragraph sort - 300 entries

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

Combines all items - 226 entries

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

Exchanging Quotes - 742 entries

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

Make Fancy Header - 880 entries

Make the header text stand out with surrounding asterisks

Wrap text in quotes - 270 entries

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

Replace and keep the case - 324 entries

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

Interactive git rebase changing commands - 137 entries

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

VimGolf Chatter