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]

25668 active golfers, 287350 entries, 458 challenges

Open VimGolf challenges

Shebangs for all - 1601 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 - 985 entries

Help Joe clean up what Steve has cobbled.

Count both ways - 878 entries

Right AND down.

Mirror Symmetry - 701 entries

Add backslashes.

camel riding - 693 entries

add a prefix on some camelCase variables

remove dupes from array - 1197 entries

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

Python challenge - 112 entries

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

Where should I put the Newline? - 798 entries

Help me put the newline.

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

citizen_hacks_2019_part5 - 6 entries

For the Citizen Hacks 2019 Vim competition

Hash staircase - 34 entries

Can you use a strategy to come up with this pattern?

From A to B - 496 entries

Mirror and change this text block

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

Change the content of a string - 1238 entries

This docstring is a complete lie. Fix it.

unknown command - 110 entries

I want change 5 words

Flip the bit - 80 entries

Change the specific 0 to a 1.

Array propagate - 241 entries

Complete the array with the keys as part of the value

Array Transposition - 141 entries

Transpose four arrays into two.

Let's play some Ivmgolf - 923 entries

Oops, I spelled that wrong.

Todo list specification - 297 entries

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

Paragraph breaks - 407 entries

Swap the blank lines and the aaa lines.

If-then-else regexp - 37 entries

Rules: - golf is never following golf - vim comes first! Drawing a finite-state machine diagram could help. #regexp

Gray area - 645 entries

It's a golf metaphor or something.

Alsa configuration - 471 entries

I'm tweaking my ~/.asoundrc file!

The Cake is a Lie - 1127 entries

Correct the capitalization of each word

Letterbox - 71 entries

Make a box!

Sort and add attributes - 1090 entries

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

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

Two become one - 676 entries

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

Triangular Numbers - 59 entries

Generate the first 50 triangular numbers.

Append semicolon after expressions - 872 entries

Some lines need the semicolon, some don't.

Remember VimGolf Rules ! - 203 entries

Rules, ... and don't forget !

Reconstruct the Sentence - 1028 entries

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

Create a table - 246 entries

Convert the given input into a formatted table

Hello ${world} - 232 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

Make Fancy Header - 919 entries

Make the header text stand out with surrounding asterisks

Simple addition - 234 entries

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

Exchanging Quotes - 761 entries

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

Paragraph sort - 325 entries

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

A Simple One - 845 entries

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

Rule 110 - 28 entries

Compute the next 5 iterations of Rule 110 with the given starting state.

Kolakoski sequence -- level 1 - 51 entries

Generate the Kolakoski sequence as described by its first 75 terms.

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

Ugly spreadsheet copy/paste to CSV - 731 entries

convert an ugly spreadsheet copy/paste into a CSV format.

Santa's naughty / nice list - 70 entries

Christmas is here and Santa hasn't decided who's naughty or nice yet. He's given a list of names to his programmer friend to quickly split the children into naughty and nice. Hint: There's a hidden pattern that might be familiar.

Stairstep digits - 218 entries

Remove the evens. Double the odds.

Nesting SASS - 223 entries

Move a block inside another block and indent it

Flodder-challenge - 807 entries

Replace the text the most efficient and win!

Replace and keep the case - 347 entries

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

Combines all items - 244 entries

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

VimGolf Chatter