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]

Played Challenges

Interweave two blocks of text - 562 entries

Suppose you've got data on a list of things from multiple sources. They're all in separate chunks, so how might you create a tabular output?

  • Best score: 15
  • Best player score: 16
  • Position: #33 / 203
  • Number of attempts: 4
Words in parens - 12721 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #16 / 3914
  • Number of attempts: 4
paste indent correction - JS - 89 entries

You copy some javascript code from a website and paste it into vim, it does not look good!

  • Best score: 16
  • Best player score: 16
  • Position: #8 / 52
  • Number of attempts: 1
Word frequency alignment - 235 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...

  • Best score: 5
  • Best player score: 5
  • Position: #46 / 143
  • Number of attempts: 1
Convert pandoc unordered list to a numbered list - 141 entries

I know it's possible to use #. in pandoc to auto-generate numbered lists, but then it's not easy to tell how many items there are when reading it in Markdown. How fast can you make the switch?

  • Best score: 20
  • Best player score: 22
  • Position: #4 / 52
  • Number of attempts: 3
SFD-ROC: ROT13 Phonics - 78 entries

A is for apple, b is for ball, etc... This familiar phonics poem has been rotated 13 characters. Make the letter match the word.

  • Best score: 6
  • Best player score: 6
  • Position: #16 / 63
  • Number of attempts: 1
Vertical Limit - 2363 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 22
  • Position: #101 / 714
  • Number of attempts: 3
Aligning function arguments to match a specific coding style - 189 entries

Most projects have specific coding style guidelines. In this case, the argument list must be broken into a new line for each argument, with the argument names right aligned, taking into account pointers.

  • Best score: 16
  • Best player score: 17
  • Position: #13 / 63
  • Number of attempts: 2
Exchanging Quotes - 791 entries

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

  • Best score: 30
  • Best player score: 32
  • Position: #41 / 218
  • Number of attempts: 3
replacing each line of a block selection - 2777 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 18
  • Position: #18 / 731
  • Number of attempts: 5
Switch function arguments - 1967 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #183 / 624
  • Number of attempts: 3
Append semicolon after expressions - 939 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #4 / 383
  • Number of attempts: 3
Reverse and double space - 441 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 14
  • Position: #6 / 182
  • Number of attempts: 2
Remove noise from HTTP log - 657 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 15
  • Position: #13 / 259
  • Number of attempts: 2
Remove semicolons after expressions - 530 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 6
  • Position: #4 / 231
  • Number of attempts: 2
un-C-escape string - 53 entries

Convert escape sequences to characters

  • Best score: 12
  • Best player score: 12
  • Position: #19 / 47
  • Number of attempts: 1
switch variable - 4901 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #88 / 1698
  • Number of attempts: 6
The meaning - 520 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #42 / 335
  • Number of attempts: 1
Ugly spreadsheet copy/paste to CSV - 817 entries

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

  • Best score: 19
  • Best player score: 21
  • Position: #35 / 172
  • Number of attempts: 9
Replacing some words - 406 entries

How fast could it be?

  • Best score: 17
  • Best player score: 17
  • Position: #13 / 143
  • Number of attempts: 3
Sort the cardinal numbers - 268 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 12
  • Position: #24 / 138
  • Number of attempts: 2
Make it more readable - 1882 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Position: #16 / 620
  • Number of attempts: 7
Line Zipper - 430 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 13
  • Position: #35 / 203
  • Number of attempts: 6
remove dupes from array - 1281 entries

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

  • Best score: 17
  • Best player score: 17
  • Position: #34 / 324
  • Number of attempts: 11
Alphabetize the directory - 267 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 30
  • Position: #5 / 96
  • Number of attempts: 7
PHP Array Syntax -> MailChimp Merge Syntax - 456 entries

I recently needed to send an e-mail to our marketing department listing allowed merge tags for our MailChimp campaigns. The allowed merge tags were determined from a PHP array in one of our PHP classes. I transformed the PHP class to MailChimp's syntax and sent the e-mail. It was, however, a long, laborious process. I'm still fairly new to Vim and would love to see how an expert Vim user would tackle one of my own, real-world problems. Thanks and have fun!

  • Best score: 23
  • Best player score: 23
  • Position: #12 / 141
  • Number of attempts: 7
Complete the hex array data - 190 entries

Do not use external tools(e.g. tac, seq) [My interpretation of Rule #7]

  • Best score: 23
  • Best player score: 24
  • Position: #7 / 72
  • Number of attempts: 6
Case preserving word replacement - 436 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

  • Best score: 19
  • Best player score: 19
  • Position: #43 / 175
  • Number of attempts: 5
Complete the hex array data (Part II) - 135 entries

Do not use external tools(e.g. tac, seq) [My interpretation of Rule #7]

  • Best score: 20
  • Best player score: 22
  • Position: #27 / 64
  • Number of attempts: 3
Sort entries based on date - 319 entries

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

  • Best score: 11
  • Best player score: 11
  • Position: #28 / 107
  • Number of attempts: 5
The Cake is a Lie - 1189 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #121 / 484
  • Number of attempts: 4
Simple text editing with Vim - 11589 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 13
  • Position: #68 / 3402
  • Number of attempts: 7
Sebastian Kusnier
Twitter:

Germany

entered into 32 challenges

contributed 0 challenges