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]

29684 active golfers, 358507 entries, 498 challenges

Open VimGolf challenges

Flodder-challenge - 829 entries

Replace the text the most efficient and win!

Convert Application Output to CSV - 140 entries

Change the application output to comma-separated values

Paragraph sort - 356 entries

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

Hello ${world} - 269 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

Reformat Cura settings - 102 entries

Cura settings are weirdly encoded... After mere replacements, you'll have to enquote two strings (infill_pattern & speed_travel) and dont forget booleans in lowercase. #format #json

Create a table - 264 entries

Convert the given input into a formatted table

citizen_hacks_2019_challenge5 - 94 entries

For the Citizen Hacks 2019 Vim competition.

HTML to Haml - 758 entries

Help convert this HTML page to Haml.

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.

Simple addition - 262 entries

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

Remember VimGolf Rules ! - 218 entries

Rules, ... and don't forget !

Reverse Simple Deletion - 739 entries

You did the simple deletion, now reverse it.

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.

Replace and keep the case - 369 entries

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

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.

Mute the second method of this script - 420 entries

prepend a # infront of every line of the second method

Array Transposition - 160 entries

Transpose four arrays into two.

Wrap text in quotes - 315 entries

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

Mr. Hacker - 22 entries

Elvin is hacker. He has piece of users database from some social net site. Recently he installed Vim, and he wants to convert CSV DB to specific format `key=value' where `key' is login and `value' is password, but password in DB is encrypted in ROT13. Help him.

Nesting SASS - 241 entries

Move a block inside another block and indent it

Prefixes and suffixes - 531 entries

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

lamb had a little Mary - 537 entries

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

add line and index - 48 entries

a missed line and index names need to be added

Swap assigned value - 525 entries

Simple problem but looking for interesting solutions.

Combines all items - 255 entries

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

VimGolfNight - 478 entries

Based on "The name of the game".

Stairstep digits - 227 entries

Remove the evens. Double the odds.

Braces or Brackets? - 644 entries

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

Python challenge - 124 entries

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

Right Align Part of the line - 39 entries

The challenge is to right align a part of the line - this is useful in some SQL queries where it's more clear which are the fields displayed

Minimalist Limerick - 500 entries

Reproduce this lovely poem.

Lisp Condense - 401 entries

Reduce 4 cons selection operations down to one function call.

Happy TvvO - 370 entries

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

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.

120 Degrees - 389 entries

Rotate that triangle.

unknown command - 120 entries

I want change 5 words

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 http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

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!

Remember FizzBuzz? - 548 entries

Output FizzBuzz to 100. Start with nothing.

Counting in binary - 405 entries

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

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

Reformat some Python - 531 entries

Fix some very bizarrely laid-out code.

VimGolf Chatter