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]

28538 active golfers, 337537 entries, 481 challenges

Open VimGolf challenges

Neither Fizz nor Buzz - 204 entries

Not your regular increment macro! The gaps are tricky.

citizen_hacks_2019_challenge1 - 28 entries

For the Citizen Hacks 2019 Vim competition

Start coding format - 124 entries

I used to start coding with following format: int main(){ -(cursor here) }

Reformat long lines - 317 entries

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

Array of characters - 132 entries

We all copy paste things off the internet, but the syntax doesn't look right. Fix it as fast as possible.

Shift down - 189 entries

Number words are back.

Get rid of html tags - 316 entries

Want to read more about Vim's background? Then get rid of those html tags...

underscore_to_camelCase - 141 entries

Pointy haired boss decided we need to switch to camelCase. Let's get this over with.

abcd > a b c d - 248 entries

transform the single spaces into 4 spaces repeat for each line

Vim's not included features - 157 entries

Filter not included (-) features in a hypothetical installation of vim.

Refactor static member invocation - 185 entries

Someone used a static method. Refactor the method into a static import while fixing the assertion.

JS notation to Immutable.js notation - 143 entries

Now Immutable.js made its way into many frontends. This challenge consists of a typical refactoring that many of us are facing now.

The holy-grail may help - 302 entries

Can you find it in less than 20 strokes, Arthur?

Prime Numbers - 302 entries

List the first 100 prime numbers.

Restore order to the alphabet - 159 entries

The numbers are OK. The letters are wonky.

Subnetting - 72 entries

Split up the IP addresses in the right way.

Wget failed to download redirections - 168 entries

Output of a wget session, where 302 where not properly handled due to certificate problems, has been saved to a file. Keep the correct URLs to start again downloading.

Readable Rubyhash - 232 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!

Free hyphen! - 130 entries

Just like "Inner hyphens", but I'm giving you a free hyphen to play with. Will your solution be any different?

Enumerate words - 225 entries

Enumerate the unique words in order.

Rule 110 - 32 entries

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

82 bottles of beer on the wall - 280 entries

Take them down. (sorry, only 82 bottles because the problem size is limited!)

Compile C - 280 entries

You might have to get clever to do this one.

Alphabetize the directory - 260 entries

Put the contacts and their information in alphabetical order.

Create Leading Zeros - 197 entries

Create leading zeros only for id columns. Please use generic approach!

Deleting folded text - 274 entries

The text below contains three folds. Delete them (and the text inside them). For example: 123 456 /*{{{*/ 789 /*}}}*/ 012 Should become: 123 012 Also, add `aoeuaoeu` to make sure small solutions don't get flagged as cheating.

Word frequency alignment - 215 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

remove all lines in first part - 149 entries

From the second part, remove all lines in the first part. It can be useful when you have done something from a long list, you want to know what is not done yet!

A grid of punctuation - 112 entries

Create a checkerboard of = and - in an 80×24 grid!

Suffix sort - 166 entries

Sort from the end of the line, as if the letters in each line were reversed.

expand a list comprehension (python) - 266 entries

Please show your way to convert a list comprehension in python to an ordinary for-loop expression!

Number an outline - 199 entries

The indent and words are right, but the numbers are all wrong.

Change attribute to getter - 96 entries

Wrap attributes with a getter method.

simple format (3) - 43 entries

reverse two column values!

On Being Stylish - 50 entries

Your PR cannot be accepted if you don't follow our corporate style guide.

Inner hyphens - 114 entries

Yet another hyphen challenge. Adding 5 hyphens to a file shouldn't be too hard.

citizen_hacks_2019_challenge3 - 22 entries

For the Citizen Hacks 2019 Vim competition.

snowflake fractal - 36 entries

From step 0 to step 3 of a fractal

Fix the Haiku - 247 entries

Change this slightly scrambled haiku to its unscrambled form and fix the capitalisation and punctuation along the way.

Top X - 182 entries

The End File is the Top 10 Vimgolf Leaderboard at June 29, 2013. This is a second version, with a great contribution of @udioica. X is ten in Roman,a numeric system in ancient Rome

increment by column in XML - 140 entries

modify an arbitrary "column" in an xml table by incrementing a an arbitrary placeholder string

Round Round - 240 entries

Round Round

Change name of a variable - 148 entries

Replace the name of the $variable with the fastest move possible. The challenge is having a command that allow you to easily change the variable name even if its indented.

Subtraction - 147 entries

Solve the equations.

Sort the cardinal numbers - 226 entries

Maybe a simple challenge.

Python to Ruby - 188 entries

Convert this Python code to Ruby. NOTE: This program likely won't run.

Interleave lines - 126 entries

This is some kind of « paste -d'\n' c b a ». There are many ways to achieve this.. just find the shortest!

Recursively Palindrome - 220 entries

Note that there are 2^6-1 characters.

Sorting a glossary - 101 entries

Sort a glossary. Glossary head contains a header phrase ending with ':' and glossary body has multi line text indented with a tab.

Java Array2List - 216 entries

Convert an java array initializer into a list.

VimGolf Chatter