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]

29684 active golfers, 358507 entries, 498 challenges

Open VimGolf challenges

Shuffled numbers - 203 entries

Each number is paired with the number it should follow. That's enough information to put them in order.

NBCU Weekly Challenge - Test - 227 entries

Just testing.

Change your calendar - 278 entries

Happy New Year!

Sort entries based on date - 315 entries

Sort some entries in a Ledger-file based on date.

Sort files from hosts - 137 entries

Resume files by host. I hope you enjoy with this challenge

learn vim in short time - 206 entries

so happy to learn vim.because vim is awesome

Mirrored text - 159 entries

backward and forward, and long enough to be challenging

Sorting database text output - 194 entries

Sometimes it is nice to be able to quickly take column-formatted text output from the SQL command line and turn it into a list of useful data. In this case we want a unique, sorted list of the values from the second column combined into one comma-separated list. What is the fewest strokes you can do this in?

FoodCritic023: Prefer conditional attributes - 166 entries

FoodCritic (www.foodcritic.io) is a lint tool for your Chef (learn.chef.io) cookbooks. FC023 indicates that you should prefer Chef guards over Ruby conditions. This challenge expects you to be able to fix this issue in a sample cookbook, given the FoodCritic output: ================================================================ FC023: Prefer conditional attributes: cookbooks/foo/recipes/default.rb:25 ================================================================ See http://www.foodcritic.io/#FC023 for more details about the changes being made.

Table Reshuffle - 326 entries

Fix the column order in this table... also append the new 'username' column.

Get rid of html tags - 319 entries

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

Neither Fizz nor Buzz - 205 entries

Not your regular increment macro! The gaps are tricky.

Vim's not included features - 168 entries

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

Reformat long lines - 317 entries

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

For all cases. - 110 entries

In this case... change it! :) Watch the line.

Un"finnish"ed Work - 104 entries

Replace å by a, ä by a and ö by o.

Start coding format - 128 entries

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

JS notation to Immutable.js notation - 151 entries

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

Shift down - 189 entries

Number words are back.

abcd > a b c d - 248 entries

transform the single spaces into 4 spaces repeat for each line

underscore_to_camelCase - 145 entries

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

The holy-grail may help - 304 entries

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

Prime Numbers - 302 entries

List the first 100 prime numbers.

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.

Refactor static member invocation - 187 entries

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

Kolakoski sequence -- level 1 - 51 entries

Generate the Kolakoski sequence as described by its first 75 terms.

Restore order to the alphabet - 161 entries

The numbers are OK. The letters are wonky.

citizen_hacks_2019_challenge6 - 36 entries

For the Citizen Hacks 2019 Vim competition.

Subnetting - 79 entries

Split up the IP addresses in the right way.

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

Compile C - 287 entries

You might have to get clever to do this one.

Wget failed to download redirections - 169 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.

Free hyphen! - 135 entries

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

Enumerate words - 226 entries

Enumerate the unique words in order.

82 bottles of beer on the wall - 281 entries

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

Suffix sort - 177 entries

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

Alphabetize the directory - 261 entries

Put the contacts and their information in alphabetical order.

remove all lines in first part - 158 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!

Deleting folded text - 279 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 - 220 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...

Create Leading Zeros - 197 entries

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

expand a list comprehension (python) - 267 entries

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

Hash staircase - 38 entries

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

Number an outline - 201 entries

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

A grid of punctuation - 112 entries

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

If-then-else regexp - 37 entries

Rules: - golf is never following golf - vim comes first! Drawing a finite-state machine diagram could help. #regexp

Change attribute to getter - 97 entries

Wrap attributes with a getter method.

Top X - 185 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

Fix the Haiku - 247 entries

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

Subtraction - 155 entries

Solve the equations.

VimGolf Chatter