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]

26401 active golfers, 302119 entries, 461 challenges

Open VimGolf challenges

remove dupes from array - 1253 entries

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

camel riding - 713 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? - 810 entries

Help me put the newline.

From A to B - 516 entries

Mirror and change this text block

Change the content of a string - 1257 entries

This docstring is a complete lie. Fix it.

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

Let's play some Ivmgolf - 945 entries

Oops, I spelled that wrong.

citizen_hacks_2019_challenge6 - 33 entries

For the Citizen Hacks 2019 Vim competition.

Paragraph breaks - 417 entries

Swap the blank lines and the aaa lines.

Gray area - 655 entries

It's a golf metaphor or something.

The Cake is a Lie - 1140 entries

Correct the capitalization of each word

Array propagate - 253 entries

Complete the array with the keys as part of the value

Todo list specification - 302 entries

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

Sort and add attributes - 1101 entries

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

Alsa configuration - 471 entries

I'm tweaking my ~/.asoundrc file!

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

Python challenge - 115 entries

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

Array Transposition - 151 entries

Transpose four arrays into two.

Two become one - 682 entries

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

Append semicolon after expressions - 881 entries

Some lines need the semicolon, some don't.

Reconstruct the Sentence - 1030 entries

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

unknown command - 114 entries

I want change 5 words

Remember VimGolf Rules ! - 205 entries

Rules, ... and don't forget !

Flip the bit - 84 entries

Change the specific 0 to a 1.

Create a table - 251 entries

Convert the given input into a formatted table

Make Fancy Header - 923 entries

Make the header text stand out with surrounding asterisks

citizen_hacks_2019_challenge1 - 26 entries

For the Citizen Hacks 2019 Vim competition

Exchanging Quotes - 769 entries

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

Letterbox - 77 entries

Make a box!

Hello ${world} - 238 entries

Migrate a JavaScript String from concatenation to ES6 interpolation.

Paragraph sort - 333 entries

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

Simple addition - 234 entries

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

A Simple One - 849 entries

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

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 - 732 entries

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

Flodder-challenge - 814 entries

Replace the text the most efficient and win!

Stairstep digits - 223 entries

Remove the evens. Double the odds.

Nesting SASS - 228 entries

Move a block inside another block and indent it

Replace and keep the case - 351 entries

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

Wrap text in quotes - 301 entries

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

Mute the second method of this script - 417 entries

prepend a # infront of every line of the second method

Triangular Numbers - 59 entries

Generate the first 50 triangular numbers.

Combines all items - 245 entries

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

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.

Hash staircase - 36 entries

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

The name of the game - 588 entries

End up with the name of the game.

Reverse Simple Deletion - 722 entries

You did the simple deletion, now reverse it.

Assignment Alignment - 707 entries

line up the operators. Use spaces, not tabs.

VimGolf Chatter