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

Quote modules (ver.2) - 112 entries

Complete golang import statement.

Add text at some column - 112 entries

Complete golang struct statement.

Learn some german verbs - 429 entries

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

Song Transcription Oops - 197 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 :)

Scrambled numbers - 764 entries

Four is NOT 1. One is 1.

Do you demand a shrubbery? - 1043 entries

Use :redir and crush the emacsgolfers.

Mess in revision history - 1084 entries

Help Joe clean up what Steve has cobbled.

Fix the XML - 909 entries

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

C Reformatting - 665 entries

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

Build a six - 259 entries

Just enjoy building "a" floors...

Count both ways - 931 entries

Right AND down.

Join 'em - 192 entries

This shouldn't be too tough

remove dupes from array - 1260 entries

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

C# data class to F# record - 48 entries

Converting from C# to F# is not hard, but requires some manual labor. Here you should convert from a C# data class to a F# record.

Mirror Symmetry - 739 entries

Add backslashes.

Extract wireshark capture filter - 151 entries

Extract wireshark capture filter from IP plan

Simple format (2) - 256 entries

try again!

camel riding - 731 entries

add a prefix on some camelCase variables

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.

Where should I put the Newline? - 830 entries

Help me put the newline.

citizen_hacks_2019_challenge2 - 140 entries

For the Citizen Hacks 2019 Vim competition.

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.

Change the content of a string - 1270 entries

This docstring is a complete lie. Fix it.

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

From A to B - 533 entries

Mirror and change this text block

Around the clock - 152 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

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.

Number Sort - 265 entries

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

Gray area - 669 entries

It's a golf metaphor or something.

Swap the operands under comparison - 240 entries

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

Triangle of arrows - 72 entries

I made this by accident when working on another challenge. How would you go about making this?

Append semicolon after expressions - 898 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?

Paragraph breaks - 431 entries

Swap the blank lines and the aaa lines.

Alsa configuration - 478 entries

I'm tweaking my ~/.asoundrc file!

Todo list specification - 327 entries

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

Array propagate - 268 entries

Complete the array with the keys as part of the value

Make Fancy Header - 929 entries

Make the header text stand out with surrounding asterisks

Exchanging Quotes - 777 entries

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

Convert Application Output to CSV - 140 entries

Change the application output to comma-separated values

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

Ugly spreadsheet copy/paste to CSV - 768 entries

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

A Simple One - 860 entries

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

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

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

citizen_hacks_2019_challenge5 - 92 entries

For the Citizen Hacks 2019 Vim competition.

VimGolf Chatter