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]

29248 active golfers, 350571 entries, 493 challenges

Open VimGolf challenges

Mirrored text - 157 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?

learn vim in short time - 204 entries

so happy to learn vim.because vim is awesome

Sort entries based on date - 305 entries

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

citizen_hacks_2019_challenge6 - 36 entries

For the Citizen Hacks 2019 Vim competition.

Table Reshuffle - 326 entries

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

Vim's not included features - 168 entries

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

Un"finnish"ed Work - 104 entries

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

For all cases. - 108 entries

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

Neither Fizz nor Buzz - 205 entries

Not your regular increment macro! The gaps are tricky.

Kolakoski sequence -- level 1 - 51 entries

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

Reformat long lines - 317 entries

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

Start coding format - 128 entries

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

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

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

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

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.

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.

Subnetting - 79 entries

Split up the IP addresses in the right way.

JS notation to Immutable.js notation - 144 entries

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

Restore order to the alphabet - 161 entries

The numbers are OK. The letters are wonky.

Hash staircase - 38 entries

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

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! - 135 entries

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

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.

Enumerate words - 226 entries

Enumerate the unique words in order.

Suffix sort - 177 entries

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

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!

82 bottles of beer on the wall - 281 entries

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

Compile C - 281 entries

You might have to get clever to do this one.

Alphabetize the directory - 261 entries

Put the contacts and their information in alphabetical order.

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...

If-then-else regexp - 37 entries

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

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!

Number an outline - 201 entries

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

citizen_hacks_2019_challenge1 - 29 entries

For the Citizen Hacks 2019 Vim competition

A grid of punctuation - 112 entries

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

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.

Inner hyphens - 115 entries

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

increment by column in XML - 143 entries

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

Round Round - 242 entries

Round Round

Change name of a variable - 152 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.

Sort the cardinal numbers - 232 entries

Maybe a simple challenge.

VimGolf Chatter