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]

26401 active golfers, 302119 entries, 461 challenges

Open VimGolf challenges

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.

A simple change - 362 entries

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

Stairs Indenting - 360 entries

Indent each line with <line number> whitespaces.

Pairs of numbers - 325 entries

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

Replacing some words - 400 entries

How fast could it be?

Context insensitive completion 0 - 445 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 - 443 entries

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

Going underground.... - 291 entries

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

Label grid cells (6x6) - 13 entries

Label the cells of a grid with its coordinates. Rows are labelled top to bottom from A to F, and columns left to right from A to F. Each cell has a coordinate MN, where M is the row letter and N is the column letter.

citizen_hacks_2019_part6 - 12 entries

For the Citizen Hacks 2019 Vim competition

Indentation - 416 entries

Indent each line according to the right number of spaces it needs.

Line Zipper - 397 entries

Zip/pair related lines.

vim1001 - 243 entries

change number 1001 into a "vim1001 sequence". (My first challenge, hope it is not too bad... )

Generate English Alphabets - 413 entries

Start with a, get up to z.

The Quick Brown Fox Jumps Over The Lazy Vim - 330 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

Case preserving word replacement - 392 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

Context Insensitive completion 1 - 395 entries

Finish writing this simple Python HTTP server.

you're stuck on jQuery < 1.7 - 317 entries

replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`

Un"finnish"ed Work - 102 entries

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

Insert a Markdown link - 387 entries

Put a link in a markdown document, using the after-the-paragraph format.

Shuffled numbers - 199 entries

Each number is paired with the number it should follow. That's enough information to put them in order.

Sort files from hosts - 129 entries

Resume files by host. I hope you enjoy with this challenge

For all cases. - 105 entries

In this case... change it! :) Watch the line.

Reverse and count - 379 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

snowflake fractal - 34 entries

From step 0 to step 3 of a fractal

simple format (3) - 43 entries

reverse two column values!

NBCU Weekly Challenge - Test - 221 entries

Just testing.

Mirrored text - 153 entries

backward and forward, and long enough to be challenging

Hatsuyume - 365 entries

Sort the VimGolf challenges by popularity - 274 entries

"Sort by popularity" is a good order to play the challenges. Not perfect, but you could do a lot worse. ;) Input is a sample copy-pasted from Some of the challenge names have digits that will get in your way, so read ":help :sort" for hints on sorting with a regex. When you're done, try your solution on the full list!

FoodCritic023: Prefer conditional attributes - 161 entries

FoodCritic ( is a lint tool for your Chef ( cookbooks. FC023 indicates that you should prefer Chef guards over Ruby conditions. This challenge expects you to be able to fix this issue in a sample cookbook, given the FoodCritic output: ================================================================ FC023: Prefer conditional attributes: cookbooks/foo/recipes/default.rb:25 ================================================================ See for more details about the changes being made.

Rotating Philosophers Problem - 358 entries

Can you help the philosophers find a good place to sit before they get five forks and spaghetti?

Sorting database text output - 188 entries

Sometimes it is nice to be able to quickly take column-formatted text output from the SQL command line and turn it into a list of useful data. In this case we want a unique, sorted list of the values from the second column combined into one comma-separated list. What is the fewest strokes you can do this in?

On Being Stylish - 50 entries

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

Start coding format - 119 entries

I used to start coding with following format: int main(){ -(cursor here) }

Change your calendar - 263 entries

Happy New Year!

Subnetting - 66 entries

Split up the IP addresses in the right way.

Array of characters - 127 entries

We all copy paste things off the internet, but the syntax doesn't look right. Fix it as fast as possible.

[Real World] PHP To Markdown - 25 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!

Sort entries based on date - 304 entries

Sort some entries in a Ledger-file based on date.

underscore_to_camelCase - 139 entries

Pointy haired boss decided we need to switch to camelCase. Let's get this over with.

JS notation to Immutable.js notation - 143 entries

Now Immutable.js made its way into many frontends. This challenge consists of a typical refactoring that many of us are facing now.

Vim's not included features - 157 entries

Filter not included (-) features in a hypothetical installation of vim.

Table Reshuffle - 325 entries

Fix the column order in this table... also append the new 'username' column.

learn vim in short time - 186 entries

so happy to learn vim.because vim is awesome

Shift down - 184 entries

Number words are back.

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.

Refactor static member invocation - 185 entries

Someone used a static method. Refactor the method into a static import while fixing the assertion.

Reformat long lines - 316 entries

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

VimGolf Chatter