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]

22293 active golfers, 231048 entries, 392 challenges

Open VimGolf challenges

Letter case trickery - 1375 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 - 672 entries

Four is NOT 1. One is 1.

C Reformatting - 545 entries

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

Array propagate - 199 entries

Complete the array with the keys as part of the value

Make it more readable - 1669 entries

Insert blank lines to make it more organized and readable

Make HTML List - 785 entries

Turn the comma separated list into an unordered html list.

Remember VimGolf Rules ! - 175 entries

Rules, ... and don't forget !

Fix the XML - 803 entries

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

Do you demand a shrubbery? - 955 entries

Use :redir and crush the emacsgolfers.

Numbering a List - 1680 entries

Pretty simple, number the list.

Todo list specification - 264 entries

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

Count both ways - 840 entries

Right AND down.

Mirror Symmetry - 668 entries

Add backslashes.

SFD-ROC: vimvimvim - 1222 entries

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

Shebangs for all - 1542 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 - 899 entries

Help Joe clean up what Steve has cobbled.

From A to B - 473 entries

Mirror and change this text block

camel riding - 663 entries

add a prefix on some camelCase variables

Paragraph breaks - 376 entries

Swap the blank lines and the aaa lines.

Where should I put the Newline? - 776 entries

Help me put the newline.

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

remove dupes from array - 1155 entries

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

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

Create a table - 198 entries

Convert the given input into a formatted table

Alsa configuration - 438 entries

I'm tweaking my ~/.asoundrc file!

Simple addition - 207 entries

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

Hello ${world} - 193 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

Change the content of a string - 1194 entries

This docstring is a complete lie. Fix it.

Gray area - 601 entries

It's a golf metaphor or something.

Let's play some Ivmgolf - 855 entries

Oops, I spelled that wrong.

Stairstep digits - 192 entries

Remove the evens. Double the odds.

The Cake is a Lie - 1097 entries

Correct the capitalization of each word

Two become one - 629 entries

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

Nesting SASS - 191 entries

Move a block inside another block and indent it

Sort and add attributes - 1037 entries

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

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

Paragraph sort - 287 entries

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

Combines all items - 221 entries

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

Append semicolon after expressions - 820 entries

Some lines need the semicolon, some don't.

Reconstruct the Sentence - 982 entries

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

Interactive git rebase changing commands - 131 entries

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

Wrap text in quotes - 263 entries

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

Replace and keep the case - 317 entries

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

Exchanging Quotes - 724 entries

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

Make Fancy Header - 869 entries

Make the header text stand out with surrounding asterisks

Mute the second method of this script - 391 entries

prepend a # infront of every line of the second method

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

A Simple One - 799 entries

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

Flodder-challenge - 784 entries

Replace the text the most efficient and win!

Text to HTML Table - 127 entries

Turn the plain text table to an HTML table.

VimGolf Chatter