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 - 530 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: 17
  • Position: #76 / 196
  • Number of attempts: 3
attr_aligner - 3350 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 35
  • Position: #558 / 678
  • Number of attempts: 1
Letter case trickery - 1517 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 13
  • Position: #354 / 493
  • Number of attempts: 2
quotes inside quotes - 2996 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 3
  • Best player score: 14
  • Position: #56 / 1037
  • Number of attempts: 4
Words in parens - 12682 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #102 / 3905
  • Number of attempts: 6
Minimalist Limerick - 500 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 31
  • Position: #7 / 165
  • Number of attempts: 6
Define to require - 118 entries

When JSHint is enabled, there's a rule that doesn't let you have more than 6 arguments in a function, so the moment you need to add a 7th argument, you need to do a refactoring.

  • Best score: 62
  • Best player score: 92
  • Position: #33 / 48
  • Number of attempts: 1
Prefixes and suffixes - 533 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 23
  • Position: #50 / 175
  • Number of attempts: 5
Refactor arguments into object argument - 159 entries

A relatively common Javascript refactoring.

  • Best score: 48
  • Best player score: 76
  • Position: #48 / 63
  • Number of attempts: 1
you're stuck on jQuery < 1.7 - 325 entries

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

  • Best score: 25
  • Best player score: 27
  • Position: #38 / 104
  • Number of attempts: 7
Numbering a List - 1777 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #160 / 611
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 5835 entries

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

  • Best score: 32
  • Best player score: 53
  • Position: #1274 / 1442
  • Number of attempts: 1
Corey Glynn
Twitter:

The harmless testimonies of a dangerously sentient bipedal fleshling.

entered into 12 challenges

contributed 0 challenges