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 - 641 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: #39 / 212
  • Number of attempts: 4
Words in parens - 12868 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #27 / 3950
  • Number of attempts: 4
paste indent correction - JS - 103 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 / 58
  • Number of attempts: 1
Word frequency alignment - 278 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 / 159
  • Number of attempts: 1
Convert pandoc unordered list to a numbered list - 166 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: #7 / 57
  • Number of attempts: 3
SFD-ROC: ROT13 Phonics - 99 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 / 72
  • Number of attempts: 1
Vertical Limit - 2487 entries

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

  • Best score: 21
  • Best player score: 22
  • Position: #107 / 748
  • Number of attempts: 3
Aligning function arguments to match a specific coding style - 230 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: #17 / 70
  • Number of attempts: 2
Exchanging Quotes - 824 entries

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

  • Best score: 30
  • Best player score: 32
  • Position: #45 / 227
  • Number of attempts: 3
replacing each line of a block selection - 2966 entries

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

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

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #194 / 653
  • Number of attempts: 3
Append semicolon after expressions - 1023 entries

Some lines need the semicolon, some don't.

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

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 14
  • Position: #6 / 197
  • Number of attempts: 2
Remove noise from HTTP log - 700 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 / 272
  • Number of attempts: 2
Remove semicolons after expressions - 639 entries

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

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

Convert escape sequences to characters

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

how fast can you switch two variable ?

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

Numbers are fun!

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

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

  • Best score: 19
  • Best player score: 21
  • Position: #41 / 188
  • Number of attempts: 9
Replacing some words - 420 entries

How fast could it be?

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

Maybe a simple challenge.

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

Insert blank lines to make it more organized and readable

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

Zip/pair related lines.

  • Best score: 12
  • Best player score: 13
  • Position: #39 / 212
  • Number of attempts: 6
remove dupes from array - 1345 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 / 333
  • Number of attempts: 11
Alphabetize the directory - 284 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 30
  • Position: #5 / 100
  • Number of attempts: 7
PHP Array Syntax -> MailChimp Merge Syntax - 508 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 / 149
  • Number of attempts: 7
Complete the hex array data - 196 entries

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

  • Best score: 23
  • Best player score: 24
  • Position: #8 / 73
  • Number of attempts: 6
Case preserving word replacement - 454 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 / 180
  • Number of attempts: 5
Complete the hex array data (Part II) - 157 entries

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

  • Best score: 20
  • Best player score: 22
  • Position: #28 / 68
  • Number of attempts: 3
Sort entries based on date - 364 entries

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

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

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #121 / 517
  • Number of attempts: 4
Simple text editing with Vim - 12491 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 / 3626
  • Number of attempts: 7
Sebastian Kusnier
Twitter:

Germany

entered into 32 challenges

contributed 0 challenges