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]

25052 active golfers, 278076 entries, 436 challenges

Open VimGolf challenges

Angular naming conventions - 266 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!

The D a n k Side of the Moon - 28 entries

You're making a vaporwave cover of The Dark Side of the Moon. So for the tracklisting, you want to: 1. Change the track names to v a p o r c a s e 2. Double the track lengths (since you're slowing them down). Well... let's just double the minutes.

Minimalist Limerick - 459 entries

Reproduce this lovely poem.

120 Degrees - 351 entries

Rotate that triangle.

replace 2nd column blanks with values in same column if blank - 183 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.

Text to HTML Table - 143 entries

Turn the plain text table to an HTML table.

The meaning - 498 entries

Numbers are fun!

imports alignment (python) - 577 entries

Align as one import per line.

Add to end of each line... kinda - 264 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

Reverse characters in a line - 575 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

Line 'em up! - 275 entries

It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!

ASCII box - 295 entries

Don't forget to fix typos!

Pretty multi-line bash - 194 entries

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

Counting in binary - 393 entries

"a" represents 0; "A" represents 1. Start from zero and count to 15.

[Real World] PHP To Markdown - 18 entries

Fun refactoring I had to do in the real world. This presents several challenges: - How to create a table that fits the informations exactly - How to keep track of two informations per line while doing the refactoring - Generate the link from the actual text Have fun!

Ruby 1.9 compat - 557 entries

Remember when Ruby supported `when <expr> :`? Well, it doesn't in 1.9, so let's make sure we use `then`, without ruining our lovely new hash syntax!

lipsum lines - 239 entries

Convert a quoted block of text into strings in a list.

Remove semicolons after expressions - 451 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

Pascal's Triangle - 19 entries

Generate the first 17 left-justified rows of Pascal's triangle.

Vim tetris - 338 entries

Vim can play tetris too!

Logging with key - 275 entries

Sometimes it is better to log with meaningful key

Add Go XML to structure tags - 128 entries

The Go programming language can directly map XML to structure fields. Add the correct XML tag after each field.

Remember FizzBuzz? - 531 entries

Output FizzBuzz to 100. Start with nothing.

vim = 22 / 7 - 398 entries

pi square vim

Separate the lines - 126 entries

Every other line is mixed up. Separate them into their original texts.

Reformat most common surnames - 520 entries

Reformat copy-pasted table into a list of the most common surnames

Reformat some Python - 511 entries

Fix some very bizarrely laid-out code.

Interweave two blocks of text - 486 entries

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

7th Birthday - 163 entries

We have a bunch of numbers written from 0 to 9 in the order present in the text input file. The task is to create 7 by replacing the numbers with dashes.

Split the words - 334 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

simple format (3) - 37 entries

reverse two column values!

NATO phonetic alphabet - 394 entries

Transform the series of words into a list.

Increment, increment, increment.... - 488 entries

Vim likes macros

Shuffle puzzle - 289 entries

Sort the lines in each indent group, and sort the groups. That's the pattern. Or just move lines around manually to get a better score.

Wrap the text of an email message to 79 characters - 486 entries

You're replying to an email with silly long lines. Clean them up.

Reverse and double space - 408 entries

Reverse the order of the given lines and double space everything

Delete unwanted lines - 336 entries

Delete all lines which does not end in "o.."

Reformat a C golf submission - 476 entries

Take this C golf submission (for the "tiny but standards-compliant Hello World program" category, naturally), and turn it into formatted C code.

On Being Stylish - 50 entries

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

PHP Array Syntax -> MailChimp Merge Syntax - 421 entries

I recently needed to send an e-mail to our marketing department listing allowed merge tags for our MailChimp campaigns. The allowed merge tags were determined from a PHP array in one of our PHP classes. I transformed the PHP class to MailChimp's syntax and sent the e-mail. It was, however, a long, laborious process. I'm still fairly new to Vim and would love to see how an expert Vim user would tackle one of my own, real-world problems. Thanks and have fun!

A simple change - 359 entries

Just change the numbers in the most efficient way ...

Pairs of numbers - 325 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

Stairs Indenting - 360 entries

Indent each line with <line number> whitespaces.

Replacing some words - 400 entries

How fast could it be?

Un"finnish"ed Work - 102 entries

Replace å by a, ä by a and ö by o.

Context insensitive completion 0 - 444 entries

Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.

Sorting paragraphs - 443 entries

Order the paragraphs correctly, per prefixed index

Add fold markers to a .c file - 441 entries

Fold markers can make it easier to navigate source code. Add them to this .c file.

Going underground.... - 283 entries

Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...

VimGolf Chatter