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]

29248 active golfers, 350571 entries, 493 challenges

Open VimGolf challenges

Flodder-challenge - 829 entries

Replace the text the most efficient and win!

Resort and deup a CSV list - 125 entries

I'm always adding items to a sorted list. There has to be a better way dedup and resort the lists. There are multiple lists with varying lengths to discourage manual sorting. Also Australia's animals are weird.

add line and index - 48 entries

a missed line and index names need to be added

Create a table - 264 entries

Convert the given input into a formatted table

Paragraph sort - 342 entries

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

Hello ${world} - 255 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

Simple addition - 261 entries

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

Remember VimGolf Rules ! - 216 entries

Rules, ... and don't forget !

HTML to Haml - 758 entries

Help convert this HTML page to Haml.

Array Transposition - 160 entries

Transpose four arrays into two.

Replace and keep the case - 369 entries

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

Remove noise from HTTP log - 631 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

Reverse Simple Deletion - 736 entries

You did the simple deletion, now reverse it.

Mute the second method of this script - 420 entries

prepend a # infront of every line of the second method

Assignment Alignment - 722 entries

line up the operators. Use spaces, not tabs.

The name of the game - 597 entries

End up with the name of the game.

Wrap text in quotes - 315 entries

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

Nesting SASS - 240 entries

Move a block inside another block and indent it

Python challenge - 124 entries

Change the types of the variables in the list from str to float, while keeping the truncation.

Tables, Functions, Sprocs - 91 entries

In order to load some scripts into my database in the correct order I need to load tables first (t_), then functions (fn_), then stored procedures (sp_). The order of the t_ lines and the order of the sp_ lines should also match. Reorder the lines so they will load correctly.

Combines all items - 255 entries

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

lamb had a little Mary - 537 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

Prefixes and suffixes - 529 entries

Generate all prefixes of "vimchallenge", then all suffixes.

Stairstep digits - 227 entries

Remove the evens. Double the odds.

Swap assigned value - 525 entries

Simple problem but looking for interesting solutions.

VimGolfNight - 478 entries

Based on "The name of the game".

Braces or Brackets? - 644 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

unknown command - 120 entries

I want change 5 words

Lisp Condense - 401 entries

Reduce 4 cons selection operations down to one function call.

Minimalist Limerick - 500 entries

Reproduce this lovely poem.

Happy TvvO - 370 entries

Don’t forget the past, learn from it. Happy New Year.

120 Degrees - 389 entries

Rotate that triangle.

Generate a list of numbers - 262 entries

Please generate list of numbers from 1 to 20.

Reverse characters in a line - 602 entries

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

The meaning - 515 entries

Numbers are fun!

imports alignment (python) - 586 entries

Align as one import per line.

Remove semicolons after expressions - 499 entries

A follow-up for

citizen_hacks_2019_challenge4 - 62 entries

For the Citizen Hacks 2019 Vim competition.

Ruby 1.9 compat - 566 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!

Line 'em up! - 306 entries

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

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

Counting in binary - 405 entries

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

Remember FizzBuzz? - 548 entries

Output FizzBuzz to 100. Start with nothing.

Flip the bit - 90 entries

Change the specific 0 to a 1.

Interweave two blocks of text - 522 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?

Reformat most common surnames - 539 entries

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

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

Reformat some Python - 531 entries

Fix some very bizarrely laid-out code.

ASCII box - 303 entries

Don't forget to fix typos!

Increment, increment, increment.... - 525 entries

Vim likes macros

VimGolf Chatter