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 - 546 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: #73 / 197
  • Number of attempts: 2
Recursively Palindrome - 230 entries

Note that there are 2^6-1 characters.

  • Best score: 21
  • Best player score: 23
  • Position: #15 / 69
  • Number of attempts: 4
Multiplication table. - 190 entries

Create a multiplication table.

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

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 12
  • Position: #9 / 134
  • Number of attempts: 2
formatted text to markdown - 175 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: #18 / 63
  • Number of attempts: 2
Line Zipper - 413 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Position: #103 / 199
  • Number of attempts: 1
Complete the hex array data - 188 entries

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

  • Best score: 23
  • Best player score: 25
  • Position: #18 / 71
  • Number of attempts: 5
Case preserving word replacement - 413 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 / 169
  • Number of attempts: 4
Complete the hex array data (Part II) - 129 entries

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

  • Best score: 20
  • Best player score: 22
  • Position: #16 / 63
  • Number of attempts: 2
imports alignment (python) - 603 entries

Align as one import per line.

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

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

  • Best score: 16
  • Best player score: 16
  • Position: #5 / 91
  • Number of attempts: 5
Rotating Philosophers Problem - 373 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 / 157
  • Number of attempts: 3
HTML to Haml - 778 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 30
  • Position: #45 / 193
  • Number of attempts: 8
Reformat long lines - 320 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: #27 / 125
  • Number of attempts: 6
Generate English Alphabets - 427 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 24
  • Position: #44 / 190
  • Number of attempts: 3
Overall Vimgolf Rank - 138 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: 23
  • Best player score: 29
  • Position: #27 / 54
  • Number of attempts: 2
Numbering a List - 1797 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #161 / 614
  • Number of attempts: 6
Java Array2List - 216 entries

Convert an java array initializer into a list.

  • Best score: 67
  • Best player score: 81
  • Position: #13 / 81
  • Number of attempts: 5
Ruby 1.9 hashes - 1123 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 / 374
  • Number of attempts: 7
Assignment Alignment - 738 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 20
  • Position: #73 / 203
  • Number of attempts: 7
A Simple One - 880 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 / 589
  • Number of attempts: 2
Increment, increment, increment.... - 534 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #168 / 359
  • Number of attempts: 1
Sorting paragraphs - 473 entries

Order the paragraphs correctly, per prefixed index

  • Best score: 18
  • Best player score: 24
  • Position: #31 / 147
  • Number of attempts: 6
The Cake is a Lie - 1178 entries

Correct the capitalization of each word

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

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 21
  • Position: #37 / 116
  • Number of attempts: 1
Almost encrypted - 178 entries

Convert the first paragraph to be even less readable.

  • Best score: 5
  • Best player score: 5
  • Position: #65 / 134
  • Number of attempts: 1
Reverse characters in a line - 618 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: #22 / 228
  • Number of attempts: 8
Johan Sveholm
Twitter:

entered into 27 challenges

contributed 0 challenges