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

Readable Rubyhash - 244 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!

  • Best score: 23
  • Best player score: 29
  • Position: #58 / 92
  • Number of attempts: 2
Dehamlizing - 180 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 42
  • Position: #38 / 69
  • Number of attempts: 1
Changing URL path in CSS - 129 entries

What's the quickest way to swap out all the URLs in a CSS file? Is it wasted keystrokes using look-behinds and look-aheads? (I'm sorry for the delete/report--I made a mistake with the last one requiring an ugly search for graphic to replace with images. I just intended this to be a simple search and replace that might possibly generate some macros or normals solutions that are quicker)

  • Best score: 40
  • Best player score: 45
  • Position: #34 / 59
  • Number of attempts: 1
The Quick Brown Fox Jumps Over The Lazy Vim - 401 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 10
  • Position: #27 / 188
  • Number of attempts: 3
Complete the circuit grid! - 84 entries

Continuing from the last challenge, add additional rows to the grid. Change each of the names from 'A1'...'A10' to 'B1'...'B10', 'C1'...'C10', etc, and for each new row add 0.7 to the X values in the (X Y) at the end of each line.

  • Best score: 49
  • Best player score: 79
  • Position: #21 / 28
  • Number of attempts: 1
SFD-ROC: ASCII Logo Border - 71 entries

Draw a border around this familiar logo ;)

  • Best score: 20
  • Best player score: 29
  • Position: #17 / 31
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1581 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 9
  • Position: #147 / 439
  • Number of attempts: 1
Python to Ruby - 196 entries

Convert this Python code to Ruby. NOTE: This program likely won't run.

  • Best score: 24
  • Best player score: 44
  • Position: #50 / 59
  • Number of attempts: 1
Cleanining up 80 column concatenated text - 188 entries

1. Put the whole query on one line, remove the concatenation operators 2. Remove the double spaces that appear a few times in the query 3. Use string-interpolated variable statementPid rather than the ugly concatenation

  • Best score: 31
  • Best player score: 45
  • Position: #47 / 76
  • Number of attempts: 1
Convert pandoc unordered list to a numbered list - 165 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: 28
  • Position: #33 / 56
  • Number of attempts: 1
you're stuck on jQuery < 1.7 - 337 entries

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

  • Best score: 25
  • Best player score: 29
  • Position: #52 / 111
  • Number of attempts: 2
Vertical Limit - 2437 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #389 / 736
  • Number of attempts: 2
Make the circuit grid! - 87 entries

Copy this command for a circuit layout program to create 10 total smd commands. Increment the number in quotes to name each pad, and add 0.7 to each of the (X Y) coordinates at the end of each line.

  • Best score: 26
  • Best player score: 35
  • Position: #41 / 48
  • Number of attempts: 1
Aligning function arguments to match a specific coding style - 227 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: 24
  • Position: #54 / 68
  • Number of attempts: 1
Exchanging Quotes - 821 entries

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

  • Best score: 30
  • Best player score: 38
  • Position: #146 / 225
  • Number of attempts: 1
replacing each line of a block selection - 2946 entries

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

  • Best score: 18
  • Best player score: 21
  • Position: #339 / 767
  • Number of attempts: 1
Switch function arguments - 2078 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #210 / 651
  • Number of attempts: 2
Append semicolon after expressions - 1005 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #161 / 403
  • Number of attempts: 1
Reverse and double space - 489 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 17
  • Position: #128 / 194
  • Number of attempts: 2
Remove noise from HTTP log - 695 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: 16
  • Position: #153 / 270
  • Number of attempts: 3
constructor - 180 entries

coding a constructor for a simple class

  • Best score: 59
  • Best player score: 126
  • Position: #46 / 58
  • Number of attempts: 1
switch variable - 5031 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1058 / 1735
  • Number of attempts: 1
The meaning - 558 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #123 / 356
  • Number of attempts: 1
Format the output - 145 entries

Sometimes your standard out is a little hard to read. Take this multilevel hash and make it human readable.

  • Best score: 35
  • Best player score: 47
  • Position: #22 / 39
  • Number of attempts: 2
Ugly spreadsheet copy/paste to CSV - 973 entries

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

  • Best score: 19
  • Best player score: 36
  • Position: #110 / 185
  • Number of attempts: 2
Line Zipper - 450 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Position: #166 / 210
  • Number of attempts: 1
Alphabetize the directory - 283 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 41
  • Position: #82 / 99
  • Number of attempts: 1
HTML to Haml - 842 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 38
  • Position: #96 / 202
  • Number of attempts: 2
Generate English Alphabets - 472 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 42
  • Position: #182 / 202
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3339 entries

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

  • Best score: 16
  • Best player score: 28
  • Position: #446 / 736
  • Number of attempts: 1
Simple text editing with Vim - 12281 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #948 / 3580
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 6557 entries

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

  • Best score: 32
  • Best player score: 39
  • Position: #674 / 1614
  • Number of attempts: 2
Glen
Twitter:

やりたいことがありすぎるんだよねー

entered into 32 challenges

contributed 0 challenges