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 - 641 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: #144 / 212
  • Number of attempts: 6
Align commas - 1063 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: #235 / 243
  • 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 ! - 10652 entries

A HAPPY NEW YEAR 2014 !

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

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

  • Best score: 19
  • Best player score: 31
  • Position: #412 / 695
  • Number of attempts: 2
Letter case trickery - 1598 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: #107 / 514
  • Number of attempts: 6
Sort the VimGolf challenges by popularity - 346 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 / 106
  • Number of attempts: 2
Words in parens - 12868 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #32 / 3950
  • Number of attempts: 9
paste indent correction - JS - 103 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 / 58
  • Number of attempts: 1
Word frequency alignment - 278 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 / 159
  • Number of attempts: 2
Minimalist Limerick - 519 entries

Reproduce this lovely poem.

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

cleanup the file

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

Oops, I spelled that wrong.

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

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #71 / 410
  • Number of attempts: 4
A Simple One - 1009 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 / 648
  • Number of attempts: 1
The Cake is a Lie - 1301 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 32
  • Position: #515 / 517
  • Number of attempts: 1
Simple text editing with Vim - 12480 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 / 3623
  • Number of attempts: 8
Reformat/Refactor a Golfer Class - 6743 entries

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

  • Best score: 31
  • Best player score: 35
  • Position: #362 / 1651
  • 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