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]

26785 active golfers, 308956 entries, 462 challenges

Open VimGolf challenges

Resort and deup a CSV list - 122 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.

camel riding - 720 entries

add a prefix on some camelCase variables

Hole-in-one - 958 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? - 820 entries

Help me put the newline.

Tables, Functions, Sprocs - 88 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.

Change the content of a string - 1260 entries

This docstring is a complete lie. Fix it.

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

From A to B - 520 entries

Mirror and change this text block

Let's play some Ivmgolf - 950 entries

Oops, I spelled that wrong.

The Cake is a Lie - 1143 entries

Correct the capitalization of each word

Gray area - 662 entries

It's a golf metaphor or something.

Paragraph breaks - 424 entries

Swap the blank lines and the aaa lines.

Array propagate - 258 entries

Complete the array with the keys as part of the value

Sort and add attributes - 1105 entries

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

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

Alsa configuration - 475 entries

I'm tweaking my ~/.asoundrc file!

Todo list specification - 304 entries

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

Two become one - 691 entries

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

Append semicolon after expressions - 887 entries

Some lines need the semicolon, some don't.

Array Transposition - 159 entries

Transpose four arrays into two.

Python challenge - 123 entries

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

Reconstruct the Sentence - 1034 entries

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

Make Fancy Header - 928 entries

Make the header text stand out with surrounding asterisks

unknown command - 116 entries

I want change 5 words

Exchanging Quotes - 776 entries

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

Hello ${world} - 252 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

Create a table - 253 entries

Convert the given input into a formatted table

Remember VimGolf Rules ! - 206 entries

Rules, ... and don't forget !

Paragraph sort - 336 entries

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

A Simple One - 852 entries

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

Ugly spreadsheet copy/paste to CSV - 747 entries

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

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

Flip the bit - 86 entries

Change the specific 0 to a 1.

Simple addition - 239 entries

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

Letterbox - 83 entries

Make a box!

citizen_hacks_2019_challenge6 - 35 entries

For the Citizen Hacks 2019 Vim competition.

Flodder-challenge - 818 entries

Replace the text the most efficient and win!

Replace and keep the case - 356 entries

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

Wrap text in quotes - 306 entries

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

Stairstep digits - 225 entries

Remove the evens. Double the odds.

Mute the second method of this script - 418 entries

prepend a # infront of every line of the second method

Nesting SASS - 228 entries

Move a block inside another block and indent it

HTML to Haml - 738 entries

Help convert this HTML page to Haml.

Remove noise from HTTP log - 620 entries

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

Combines all items - 245 entries

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

Reverse Simple Deletion - 727 entries

You did the simple deletion, now reverse it.

The name of the game - 588 entries

End up with the name of the game.

Assignment Alignment - 707 entries

line up the operators. Use spaces, not tabs.

Generate a list of numbers - 254 entries

Please generate list of numbers from 1 to 20.

VimGolfNight - 465 entries

Based on "The name of the game".

VimGolf Chatter