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: 17
  • Position: #71 / 215
  • Number of attempts: 2
Python Hello World! Reformatting - 1000 entries

A novice Python using prints Hello World! and a pro shows him different way. Using vim to get into pro style from novice, win the challenge.

  • Best score: 39
  • Best player score: 46
  • Position: #300 / 382
  • Number of attempts: 1
Cartesian product - 259 entries

{1,2,3,4,5} X {1,2,3,4,5}

  • Best score: 24
  • Best player score: 35
  • Position: #59 / 97
  • Number of attempts: 1
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: #17 / 67
  • Number of attempts: 3
Line Zipper - 477 entries

Zip/pair related lines.

  • Best score: 12
  • Best player score: 16
  • Position: #106 / 216
  • 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: #14 / 74
  • Number of attempts: 2
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: 22
  • Position: #116 / 180
  • Number of attempts: 2
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: #11 / 69
  • Number of attempts: 1
imports alignment (python) - 700 entries

Align as one import per line.

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

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

  • Best score: 16
  • Best player score: 23
  • Position: #56 / 99
  • Number of attempts: 1
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: 30
  • Position: #57 / 166
  • Number of attempts: 4
HTML to Haml - 881 entries

Help convert this HTML page to Haml.

  • Best score: 23
  • Best player score: 37
  • Position: #94 / 205
  • Number of attempts: 1
expand a list comprehension (python) - 334 entries

Please show your way to convert a list comprehension in python to an ordinary for-loop expression!

  • Best score: 42
  • Best player score: 52
  • Position: #49 / 110
  • Number of attempts: 2
Numbering a List - 1935 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 24
  • Position: #469 / 654
  • Number of attempts: 1
Java Array2List - 233 entries

Convert an java array initializer into a list.

  • Best score: 67
  • Best player score: 117
  • Position: #62 / 87
  • Number of attempts: 1
Assignment Alignment - 885 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 30
  • Position: #157 / 221
  • Number of attempts: 1
Shebangs for all - 2018 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 19
  • Position: #393 / 519
  • Number of attempts: 1
82 bottles of beer on the wall - 313 entries

Take them down. (sorry, only 82 bottles because the problem size is limited!)

  • Best score: 106
  • Best player score: 121
  • Position: #43 / 146
  • Number of attempts: 2
Reverse Simple Deletion - 854 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #193 / 460
  • Number of attempts: 1
Increment, increment, increment.... - 692 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #195 / 410
  • Number of attempts: 1
The Cake is a Lie - 1361 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 10
  • Position: #325 / 531
  • Number of attempts: 2
Reformat some Python - 622 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 46
  • Position: #154 / 238
  • Number of attempts: 1
Braces or Brackets? - 1054 entries

Someone forgot whether to use braces or brackets and you have to clean up their code!

  • Best score: 34
  • Best player score: 51
  • Position: #246 / 324
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3742 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 22
  • Position: #279 / 803
  • Number of attempts: 3
Simple text editing with Vim - 12989 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #863 / 3737
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 7154 entries

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

  • Best score: 28
  • Best player score: 48
  • Position: #1311 / 1754
  • Number of attempts: 1
Thom Hughes
Twitter:

entered into 26 challenges

contributed 0 challenges