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]

30737 active golfers, 372891 entries, 513 challenges

Open VimGolf challenges

Make HTML List - 982 entries

Turn the comma separated list into an unordered html list.

SFD-ROC: vimvimvim - 1441 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

Remove quotes after first field - 310 entries

Remove the quotes around each field except for the first field.

Shebangs for all - 1718 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.

ASCII-art Histogram - 269 entries

Create an ASCCI-art histogram for the given numbers. Make sure not to leave trailing whitespaces. Thanks to VimGolf I recently discovered a feature of Vim thAT blew my mind. I'm curious to see what real ninjas make of it ;-)

Do you demand a shrubbery? - 1079 entries

Use :redir and crush the emacsgolfers.

Learn some german verbs - 486 entries

The list needs to be structured so we can print in verbatim and feel ok about how it looks.

Mess in revision history - 1117 entries

Help Joe clean up what Steve has cobbled.

Turn the x - 114 entries

Turn the x to a +

Fix the XML - 933 entries

The challenge consists in having a valid xml from an incomplete source.

calculations - 244 entries

Complete these (weird) calculations.

Scrambled numbers - 769 entries

Four is NOT 1. One is 1.

C Reformatting - 675 entries

You may use Visual mode... or not. #uppercase

Quote modules (ver.2) - 171 entries

Complete golang import statement.

Count both ways - 932 entries

Right AND down.

remove dupes from array - 1260 entries

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

change parenthesis - 235 entries

change the pair of braces into a pair of parentheses

Mirror Symmetry - 739 entries

Add backslashes.

Song Transcription Oops - 218 entries

When transcribing vocal music to Canjo Tab you can start by finding the lowest note and assigning that to zero and working your way up from there. However, without fail, I tend to miscount the notes and when I am near done I find a lower note. I mark this with a "z". This means I have to increase all the previous ones by 1. just a sting of numbers :)

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

Change the content of a string - 1270 entries

This docstring is a complete lie. Fix it.

Simple format (2) - 295 entries

try again!

camel riding - 733 entries

add a prefix on some camelCase variables

Where should I put the Newline? - 830 entries

Help me put the newline.

Build a six - 264 entries

Just enjoy building "a" floors...

Reconstruct the actual output from my unit test tool report - 115 entries

When a test fails, my unit test tool reports differences between the actual output and the expected output as follow: - line in the expected output but missing in the actual output are prefixed with a dash - unexpected lines in the actual output are prefixed with a plus sign - comments added by the unit test tool are prefixed with a question mark - common lines are showed `as-is` (well, almost;) From that "diff" format, I would like to reconstruct the actual output.

Let's play some Ivmgolf - 976 entries

Oops, I spelled that wrong.

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

The Cake is a Lie - 1168 entries

Correct the capitalization of each word

Join 'em - 206 entries

This shouldn't be too tough

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

Sort and add attributes - 1113 entries

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

From A to B - 533 entries

Mirror and change this text block

Put a cross in the square - 46 entries

Put a cross in the square

Add text at some column - 125 entries

Complete golang struct statement.

Paragraph breaks - 476 entries

Swap the blank lines and the aaa lines.

Gray area - 669 entries

It's a golf metaphor or something.

Extract wireshark capture filter - 167 entries

Extract wireshark capture filter from IP plan

Append semicolon after expressions - 899 entries

Some lines need the semicolon, some don't.

Reconstruct the Sentence - 1042 entries

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

Two become one - 692 entries

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

Extend shell script - 47 entries

Just add some more stuff

Number Sort - 281 entries

sort the list of newline-separated numbers incrementally. Numbers are in the range 1 to 1000, with 500 missing

citizen_hacks_2019_challenge2 - 156 entries

For the Citizen Hacks 2019 Vim competition.

Swap the operands under comparison - 251 entries

Swap the operands under comparison to prevent null pointer exception (at least in java)

Alsa configuration - 478 entries

I'm tweaking my ~/.asoundrc file!

Todo list specification - 345 entries

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

Make Fancy Header - 929 entries

Make the header text stand out with surrounding asterisks

Around the clock - 167 entries

You'll want to use 2 special commands to complete this. If you haven't yet, read through 'input.txt', especially :help simple-changes

Exchanging Quotes - 779 entries

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

VimGolf Chatter