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: 17
  • Position: #85 / 214
  • Number of attempts: 2
Recursively Palindrome - 267 entries

Note that there are 2^6-1 characters.

  • Best score: 21
  • Best player score: 23
  • Position: #19 / 75
  • Number of attempts: 4
Multiplication table. - 232 entries

Create a multiplication table.

  • Best score: 31
  • Best player score: 74
  • Position: #33 / 68
  • Number of attempts: 5
Sort the cardinal numbers - 310 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 12
  • Position: #9 / 148
  • Number of attempts: 2
formatted text to markdown - 184 entries

You're converting some posts from an old blog to markdown. The formatted text is far closer to the finished product than the html markup, so it seems like a good place to start. Word wrapping seems to be the main area for optimization.

  • Best score: 70
  • Best player score: 75
  • Position: #19 / 67
  • Number of attempts: 2
Line Zipper - 473 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Position: #115 / 215
  • Number of attempts: 1
Complete the hex array data - 197 entries

Do not use external tools(e.g. tac, seq) [My interpretation of Rule #7]

  • Best score: 23
  • Best player score: 25
  • Position: #19 / 74
  • Number of attempts: 5
Case preserving word replacement - 454 entries

Half way through my project, my people turned into dogs. Now I have to change everything in my source.

  • Best score: 19
  • Best player score: 19
  • Position: #17 / 180
  • Number of attempts: 4
Complete the hex array data (Part II) - 166 entries

Do not use external tools(e.g. tac, seq) [My interpretation of Rule #7]

  • Best score: 20
  • Best player score: 22
  • Position: #17 / 69
  • Number of attempts: 2
imports alignment (python) - 700 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 17
  • Position: #20 / 198
  • Number of attempts: 4
It'ss tooo coold too typpe todaay - 224 entries

My hands are numb with cold. It's hard to type correctly.

  • Best score: 16
  • Best player score: 16
  • Position: #5 / 98
  • Number of attempts: 5
Rotating Philosophers Problem - 410 entries

Can you help the philosophers find a good place to sit before they get five forks and spaghetti?

  • Best score: 29
  • Best player score: 29
  • Position: #12 / 166
  • Number of attempts: 3
HTML to Haml - 878 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 30
  • Position: #51 / 204
  • Number of attempts: 8
Reformat long lines - 358 entries

Rearrange this ruby method call to put each parameter on its own line. Could become a useful macro.

  • Best score: 15
  • Best player score: 16
  • Position: #32 / 134
  • Number of attempts: 6
Generate English Alphabets - 487 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 24
  • Position: #52 / 206
  • Number of attempts: 3
Overall Vimgolf Rank - 216 entries

Suppose you are trying to figure out what your overall rank is at Vimgolf(the sum of all the ranks you got), and as a Vim ninja you decided to use Vim to do the job. Your solution should work for every Vimgolf profile page(The actual input file for this challenge is my Vimgolf profile page). So, direct answer insertion is considered cheating.

  • Best score: 21
  • Best player score: 29
  • Position: #30 / 59
  • Number of attempts: 2
Numbering a List - 1931 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #190 / 652
  • Number of attempts: 6
Java Array2List - 233 entries

Convert an java array initializer into a list.

  • Best score: 67
  • Best player score: 81
  • Position: #15 / 87
  • Number of attempts: 5
Ruby 1.9 hashes - 1244 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
  • Position: #25 / 406
  • Number of attempts: 7
Assignment Alignment - 883 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 20
  • Position: #83 / 220
  • Number of attempts: 7
A Simple One - 1050 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: #207 / 664
  • Number of attempts: 2
Increment, increment, increment.... - 688 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #207 / 408
  • Number of attempts: 1
Sorting paragraphs - 534 entries

Order the paragraphs correctly, per prefixed index

  • Best score: 18
  • Best player score: 24
  • Position: #39 / 163
  • Number of attempts: 6
The Cake is a Lie - 1346 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #100 / 527
  • Number of attempts: 2
Compile C - 430 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 21
  • Position: #49 / 141
  • Number of attempts: 1
Almost encrypted - 204 entries

Convert the first paragraph to be even less readable.

  • Best score: 5
  • Best player score: 5
  • Position: #65 / 146
  • Number of attempts: 1
Reverse characters in a line - 771 entries

You have everything you need, just not in the right order. Mastermind would give you 26 white pegs.

  • Best score: 12
  • Best player score: 13
  • Position: #32 / 265
  • Number of attempts: 8
Johan Sveholm
Twitter:

entered into 27 challenges

contributed 0 challenges