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]

30452 active golfers, 371086 entries, 513 challenges

Open VimGolf challenges

you're stuck on jQuery < 1.7 - 325 entries

replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`

Reverse and count - 389 entries

Someone typed things upside down and now a Vim ninja needs to reverse the lines and count how many there are.

Separate the lines - 140 entries

Every other line is mixed up. Separate them into their original texts.

vim1001 - 246 entries

change number 1001 into a "vim1001 sequence". (My first challenge, hope it is not too bad... )

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.

Add Go XML to structure tags - 134 entries

The Go programming language can directly map XML to structure fields. Add the correct XML tag after each field.

Rotating Philosophers Problem - 367 entries

Can you help the philosophers find a good place to sit before they get five forks and spaghetti?

Hatsuyume - 368 entries

http://en.wikipedia.org/wiki/Hatsuyume

Comparing Schema With Diff - 50 entries

Sometimes databases output things differently one to another. Fixing things that are out of order will make the diffs more usable.

NBCU Weekly Challenge - Test - 227 entries

Just testing.

Shuffled numbers - 203 entries

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

Santa's naughty / nice list - 75 entries

Christmas is here and Santa hasn't decided who's naughty or nice yet. He's given a list of names to his programmer friend to quickly split the children into naughty and nice. Hint: There's a hidden pattern that might be familiar.

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.

Triangular Numbers - 64 entries

Generate the first 50 triangular numbers.

learn vim in short time - 209 entries

so happy to learn vim.because vim is awesome

Sort files from hosts - 137 entries

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

For all cases. - 119 entries

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

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?

Table Reshuffle - 326 entries

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

Mirrored text - 159 entries

backward and forward, and long enough to be challenging

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.

Reformat long lines - 320 entries

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

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.

abcd > a b c d - 249 entries

transform the single spaces into 4 spaces repeat for each line

Suffix sort - 195 entries

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

The holy-grail may help - 304 entries

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

Shift down - 189 entries

Number words are back.

Prime Numbers - 302 entries

List the first 100 prime numbers.

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.

Subnetting - 88 entries

Split up the IP addresses in the right way.

Start coding format - 128 entries

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

underscore_to_camelCase - 145 entries

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

Refactor static member invocation - 187 entries

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

Un"finnish"ed Work - 104 entries

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

Array of characters - 133 entries

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

Compile C - 288 entries

You might have to get clever to do this one.

Restore order to the alphabet - 161 entries

The numbers are OK. The letters are wonky.

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!

Free hyphen! - 138 entries

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

Word frequency alignment - 225 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...

82 bottles of beer on the wall - 281 entries

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

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

Enumerate words - 226 entries

Enumerate the unique words in order.

Alphabetize the directory - 261 entries

Put the contacts and their information in alphabetical order.

Create Leading Zeros - 203 entries

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

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.

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.

VimGolf Chatter