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

Make HTML List - 911 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 49
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 5551 entries

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

  • Best score: 32
  • Best player score: 49
  • Number of attempts: 2
Just the middle - 9534 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
Words in parens - 11260 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 3
I forgot quotes - 12373 entries

Oops.

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 5
SFD-ROC: vimvimvim - 1305 entries

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

  • Best score: 8
  • Best player score: 12
  • Number of attempts: 3
Simple text editing with Vim - 10593 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 4
V to the i - 4054 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 4
NBCU Weekly Challenge - #0 - 121 entries

One of our favorites lines here at NBCU! p.s. The first version of #0 was deleted due to me copy/pasting a HTML entity. Congrats to the one who figured that out, you are a true ninja warrior!

  • Best score: 30
  • Best player score: 35
  • Number of attempts: 2
Ruby 1.9 hashes - 1080 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: 12
  • Best player score: 12
  • Number of attempts: 5
Switch function arguments - 1843 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 14
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 9653 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 6
Search and Replace 0 - 4187 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 6
-a-b-c- - 2670 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Number of attempts: 1
Don't know what this is - 1787 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 16
  • Number of attempts: 1
quotes inside quotes - 2826 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: 17
  • Number of attempts: 2
replacing each line of a block selection - 2569 entries

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

  • Best score: 18
  • Best player score: 36
  • Number of attempts: 1
Swap values - 3677 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 20
  • Number of attempts: 2
Vertical Limit - 2148 entries

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

  • Best score: 21
  • Best player score: 27
  • Number of attempts: 1
VimGolfNight - 458 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 2
NATO phonetic alphabet - 407 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 23
  • Number of attempts: 1
Do you demand a shrubbery? - 1018 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 27
  • Number of attempts: 1
Two become one - 676 entries

We have two c arrays and want to make one two dimensional out of it. Can we do that?

  • Best score: 25
  • Best player score: 35
  • Number of attempts: 1
Malte R
Twitter:

entered into 23 challenges

contributed 0 challenges