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

Sort the VimGolf challenges by popularity - 345 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: 16
  • Position: #40 / 105
  • Number of attempts: 2
Parsing with CSV: Unify lines and result. - 165 entries

col1;col2;col3;col4 A;1;4;5 A;3;4; A;1;4; # New output: col1;col2;col3;col4 A;1(2x);3;4(3x);5 any ideas?

  • Best score: 21
  • Best player score: 21
  • Position: #10 / 73
  • Number of attempts: 3
Sort the cardinal numbers - 293 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 13
  • Position: #59 / 146
  • Number of attempts: 2
formatted text to markdown - 183 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: 74
  • Position: #5 / 66
  • Number of attempts: 2
Complete the hex array data (Part II) - 156 entries

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

  • Best score: 20
  • Best player score: 22
  • Position: #19 / 67
  • Number of attempts: 3
imports alignment (python) - 661 entries

Align as one import per line.

  • Best score: 17
  • Best player score: 24
  • Position: #115 / 194
  • Number of attempts: 5
Rotating Philosophers Problem - 390 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: #9 / 163
  • Number of attempts: 7
Numbering a List - 1859 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #175 / 639
  • Number of attempts: 2
Assignment Alignment - 832 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 20
  • Position: #80 / 215
  • Number of attempts: 6
Compile C - 365 entries

You might have to get clever to do this one.

  • Best score: 19
  • Best player score: 27
  • Position: #112 / 132
  • Number of attempts: 1
Simple text editing with Vim - 12290 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #829 / 3581
  • Number of attempts: 3
Reformat/Refactor a Golfer Class - 6560 entries

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

  • Best score: 32
  • Best player score: 33
  • Position: #181 / 1616
  • Number of attempts: 6
Mikael Gustavsson
Twitter:

Software developer based in China, CTO at gobreaktheice.com.

entered into 12 challenges

contributed 0 challenges