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

V to the i - 4743 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #885 / 1878
  • Number of attempts: 3
Extract argument from function - 2308 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 14
  • Position: #297 / 742
  • Number of attempts: 1
Search and Replace 0 - 4785 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #792 / 1584
  • Number of attempts: 2
That hyphen - 2554 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #27 / 694
  • Number of attempts: 4
Basic renumbering - 5576 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 14
  • Position: #310 / 1255
  • Number of attempts: 3
VimGolfNight - 531 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #193 / 342
  • Number of attempts: 2
vim1001 - 275 entries

change number 1001 into a "vim1001 sequence". (My first challenge, hope it is not too bad... )

  • Best score: 17
  • Best player score: 21
  • Position: #12 / 107
  • Number of attempts: 3
Roman numerals - 68 entries

Use the substitutions on top to convert unary to Roman numerals.

  • Best score: 17
  • Best player score: 17
  • Position: #8 / 27
  • Number of attempts: 2
-a-b-c- - 3169 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #463 / 1126
  • Number of attempts: 4
Count both ways - 995 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #138 / 349
  • Number of attempts: 2
NBCU Weekly Challenge - Test - 243 entries

Just testing.

  • Best score: 18
  • Best player score: 18
  • Position: #35 / 114
  • Number of attempts: 3
120 Degrees - 468 entries

Rotate that triangle.

  • Best score: 14
  • Best player score: 18
  • Position: #67 / 143
  • Number of attempts: 1
Gray area - 724 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 12
  • Position: #48 / 267
  • Number of attempts: 2
NBCU Weekly Challenge - #0 - 124 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: 30
  • Position: #15 / 55
  • Number of attempts: 3
Neither Fizz nor Buzz - 226 entries

Not your regular increment macro! The gaps are tricky.

  • Best score: 13
  • Best player score: 15
  • Position: #20 / 99
  • Number of attempts: 3
Do you demand a shrubbery? - 1120 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 16
  • Position: #84 / 293
  • Number of attempts: 4
Don't know what this is - 1978 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: 14
  • Position: #298 / 578
  • Number of attempts: 1
Two become one - 710 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: 28
  • Position: #62 / 205
  • Number of attempts: 6
Where should I put the Newline? - 859 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 7
  • Position: #110 / 430
  • Number of attempts: 2
Vim tetris - 352 entries

Vim can play tetris too!

  • Best score: 21
  • Best player score: 21
  • Position: #18 / 101
  • Number of attempts: 8
Mess in revision history - 1157 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 17
  • Position: #27 / 245
  • Number of attempts: 7
A HAPPY NEW YEAR 2014 ! - 10615 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #478 / 3662
  • Number of attempts: 3
attr_aligner - 3444 entries

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

  • Best score: 19
  • Best player score: 19
  • Position: #77 / 692
  • Number of attempts: 4
Words in parens - 12848 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #455 / 3943
  • Number of attempts: 4
Hole-in-one - 1012 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 16
  • Position: #70 / 302
  • Number of attempts: 6
Minimalist Limerick - 516 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 35
  • Position: #77 / 171
  • Number of attempts: 1
abcd > a b c d - 279 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #142 / 217
  • Number of attempts: 1
NATO phonetic alphabet - 498 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 21
  • Position: #92 / 189
  • Number of attempts: 1
A simple change - 434 entries

Just change the numbers in the most efficient way ...

  • Best score: 12
  • Best player score: 14
  • Position: #105 / 187
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1569 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: #206 / 437
  • Number of attempts: 3
Let's play some Ivmgolf - 1084 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Position: #72 / 440
  • Number of attempts: 2
Vertical Limit - 2426 entries

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

  • Best score: 21
  • Best player score: 22
  • Position: #147 / 733
  • Number of attempts: 4
Append semicolon after expressions - 1001 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #217 / 400
  • Number of attempts: 1
The meaning - 552 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #238 / 354
  • Number of attempts: 1
imports alignment (python) - 659 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 19
  • Position: #65 / 194
  • Number of attempts: 2
Ruby 1.9 hashes - 1213 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: 13
  • Position: #161 / 397
  • Number of attempts: 2
Ruby 1.9 compat - 609 entries

Remember when Ruby supported `when <expr> :`? Well, it doesn't in 1.9, so let's make sure we use `then`, without ruining our lovely new hash syntax!

  • Best score: 14
  • Best player score: 14
  • Position: #49 / 229
  • Number of attempts: 3
The Cake is a Lie - 1284 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #192 / 511
  • Number of attempts: 2
Reformat some Python - 579 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 42
  • Position: #114 / 229
  • Number of attempts: 1
Change the content of a string - 1453 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Position: #146 / 550
  • Number of attempts: 3
Reconstruct the Sentence - 1347 entries

Get the sentence back in the proper order, remove duplicate lines, and then combine the separate lines into one.

  • Best score: 20
  • Best player score: 20
  • Position: #89 / 378
  • Number of attempts: 2
Whitespace, empty lines and tabs - 3278 entries

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

  • Best score: 16
  • Best player score: 23
  • Position: #321 / 726
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6499 entries

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

  • Best score: 32
  • Best player score: 32
  • Position: #108 / 1599
  • Number of attempts: 6
Michael Comerford
Twitter:

entered into 43 challenges

contributed 0 challenges