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 - 659 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: 18
  • Position: #146 / 214
  • Number of attempts: 6
Align commas - 1092 entries

There are 15,000 aligning challenges on vimgolf.com, and they're all exactly the same. I hope this one is a little different.

  • Best score: 11
  • Best player score: 28
  • Position: #237 / 245
  • Number of attempts: 1
Mess in revision history - 1183 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 17
  • Position: #13 / 249
  • Number of attempts: 7
A HAPPY NEW YEAR 2014 ! - 10657 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #291 / 3679
  • Number of attempts: 6
attr_aligner - 3498 entries

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

  • Best score: 19
  • Best player score: 31
  • Position: #413 / 696
  • Number of attempts: 2
Letter case trickery - 1624 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: 10
  • Position: #108 / 517
  • Number of attempts: 6
Sort the VimGolf challenges by popularity - 348 entries

"Sort by popularity" is a good order to play the challenges. Not perfect, but you could do a lot worse. ;) Input is a sample copy-pasted from vimgolf.com. Some of the challenge names have digits that will get in your way, so read ":help :sort" for hints on sorting with a regex. When you're done, try your solution on the full list!

  • Best score: 15
  • Best player score: 20
  • Position: #90 / 107
  • Number of attempts: 2
Words in parens - 12928 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #35 / 3960
  • Number of attempts: 9
paste indent correction - JS - 112 entries

You copy some javascript code from a website and paste it into vim, it does not look good!

  • Best score: 16
  • Best player score: 16
  • Position: #19 / 59
  • Number of attempts: 1
Word frequency alignment - 290 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Position: #64 / 161
  • Number of attempts: 2
Minimalist Limerick - 520 entries

Reproduce this lovely poem.

  • Best score: 30
  • Best player score: 38
  • Position: #111 / 174
  • Number of attempts: 1
fib.c cleanup - 68 entries

cleanup the file

  • Best score: 15
  • Best player score: 16
  • Position: #31 / 55
  • Number of attempts: 1
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Position: #29 / 445
  • Number of attempts: 7
Append semicolon after expressions - 1047 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #71 / 414
  • Number of attempts: 4
A Simple One - 1045 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #321 / 660
  • Number of attempts: 1
The Cake is a Lie - 1330 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 32
  • Position: #521 / 523
  • Number of attempts: 1
Simple text editing with Vim - 12712 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #150 / 3671
  • Number of attempts: 8
Reformat/Refactor a Golfer Class - 6901 entries

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

  • Best score: 28
  • Best player score: 35
  • Position: #366 / 1690
  • Number of attempts: 8
Norm Fasey
Twitter:

Father, Gadget Freak, Geek, Paraplegic, Software Engineer, Maker, Musician, Grumpy old sod sometimes. All views expressed in these tweets are views.

entered into 18 challenges

contributed 0 challenges