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

Define to require - 113 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
  • Number of attempts: 1
Refactor arguments into object argument - 157 entries

A relatively common Javascript refactoring.

  • Best score: 48
  • Best player score: 76
  • Number of attempts: 1
quotes inside quotes - 2844 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: 14
  • Best player score: 14
  • Number of attempts: 4
Words in parens - 11439 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 6
Interweave two blocks of text - 502 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
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 5570 entries

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

  • Best score: 32
  • Best player score: 53
  • Number of attempts: 1
Letter case trickery - 1451 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
  • Number of attempts: 2
Numbering a List - 1754 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Number of attempts: 4
you're stuck on jQuery < 1.7 - 317 entries

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

  • Best score: 25
  • Best player score: 27
  • Number of attempts: 7
Prefixes and suffixes - 510 entries

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

  • Best score: 17
  • Best player score: 23
  • Number of attempts: 5
Minimalist Limerick - 488 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 31
  • Number of attempts: 6
attr_aligner - 3086 entries

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

  • Best score: 19
  • Best player score: 35
  • Number of attempts: 1
Corey Glynn
Twitter:

The harmless testimonies of a dangerously sentient bipedal fleshling.

entered into 12 challenges

contributed 0 challenges