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: #30 / 203
  • Number of attempts: 1
replacing each line of a block selection - 2777 entries

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

  • Best score: 18
  • Best player score: 20
  • Position: #217 / 731
  • Number of attempts: 1
constructor - 165 entries

coding a constructor for a simple class

  • Best score: 59
  • Best player score: 61
  • Position: #4 / 56
  • Number of attempts: 2
switch variable - 4901 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #85 / 1698
  • Number of attempts: 2
Ugly spreadsheet copy/paste to CSV - 817 entries

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

  • Best score: 19
  • Best player score: 23
  • Position: #57 / 172
  • Number of attempts: 1
Multiplication table. - 195 entries

Create a multiplication table.

  • Best score: 31
  • Best player score: 49
  • Position: #10 / 63
  • Number of attempts: 3
Make it more readable - 1882 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 15
  • Position: #193 / 620
  • Number of attempts: 2
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: #18 / 324
  • Number of attempts: 1
PHP Array Syntax -> MailChimp Merge Syntax - 461 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: 25
  • Position: #49 / 142
  • Number of attempts: 2
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: 26
  • Position: #42 / 64
  • Number of attempts: 2
Sort entries based on date - 319 entries

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

  • Best score: 11
  • Best player score: 14
  • Position: #69 / 107
  • Number of attempts: 1
Refactor to Helpers - 45 entries

This Rails partial is almost all template escapes. Put it into a helper, and refactor each case to methods so we can build out the controls for each. (I've converted to tabs - fighting with Vimgolf's default config shouldn't be part of the challenge.)

  • Best score: 147
  • Best player score: 158
  • Position: #4 / 22
  • Number of attempts: 1
Rotating Philosophers Problem - 374 entries

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

  • Best score: 29
  • Best player score: 29
  • Position: #18 / 158
  • Number of attempts: 1
Remember FizzBuzz? - 569 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 54
  • Position: #44 / 164
  • Number of attempts: 1
Whitespace, empty lines and tabs - 2928 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 18
  • Position: #129 / 657
  • Number of attempts: 2
Flodder-challenge - 870 entries

Replace the text the most efficient and win!

  • Best score: 27
  • Best player score: 28
  • Position: #35 / 267
  • Number of attempts: 1
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: 14
  • Position: #848 / 3402
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 5975 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 32
  • Best player score: 33
  • Position: #201 / 1476
  • Number of attempts: 2
John Anderson
Twitter:

entered into 18 challenges

contributed 0 challenges