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 - 661 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 / 215
  • Number of attempts: 6
Align commas - 1097 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: #239 / 247
  • Number of attempts: 1
Mess in revision history - 1210 entries

Help Joe clean up what Steve has cobbled.

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

A HAPPY NEW YEAR 2014 !

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

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

  • Best score: 19
  • Best player score: 31
  • Position: #418 / 706
  • Number of attempts: 2
Letter case trickery - 1644 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 / 520
  • 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 - 12969 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #39 / 3970
  • 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 - 291 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 - 71 entries

cleanup the file

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

Oops, I spelled that wrong.

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

Some lines need the semicolon, some don't.

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

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 32
  • Position: #532 / 534
  • Number of attempts: 1
Simple text editing with Vim - 13092 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 / 3765
  • Number of attempts: 8
Reformat/Refactor a Golfer Class - 7229 entries

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

  • Best score: 10
  • Best player score: 35
  • Position: #372 / 1778
  • 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