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

remove dupes from array - 1360 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 24
  • Position: #215 / 337
  • Number of attempts: 3
Numbering a List - 1939 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #184 / 655
  • Number of attempts: 7
Getters & Setters: Java - 212 entries

Boilerplate getters & setters - it's a tedious fact of life in Java, and probably the only thing that still pulls me back to an IDE. Perhaps someone knows a fast, pure vim way...

  • Best score: 89
  • Best player score: 160
  • Position: #55 / 60
  • Number of attempts: 1
Ruby 1.9 hashes - 1260 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: 18
  • Position: #340 / 410
  • Number of attempts: 3
Assignment Alignment - 885 entries

line up the operators. Use spaces, not tabs.

  • Best score: 18
  • Best player score: 25
  • Position: #118 / 221
  • Number of attempts: 5
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: #239 / 670
  • Number of attempts: 4
Ruby 1.9 compat - 640 entries

Remember when Ruby supported `when <expr> :`? Well, it doesn't in 1.9, so let's make sure we use `then`, without ruining our lovely new hash syntax!

  • Best score: 14
  • Best player score: 21
  • Position: #211 / 236
  • Number of attempts: 3
Change the content of a string - 1665 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 29
  • Position: #538 / 615
  • Number of attempts: 1
Braces or Brackets? - 1074 entries

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

  • Best score: 34
  • Best player score: 53
  • Position: #265 / 332
  • Number of attempts: 1
Simple text editing with Vim - 13143 entries

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

  • Best score: 13
  • Best player score: 27
  • Position: #3309 / 3777
  • Number of attempts: 4
Reformat/Refactor a Golfer Class - 7259 entries

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

  • Best score: 10
  • Best player score: 48
  • Position: #1331 / 1791
  • Number of attempts: 1
Daniel Harrington
Twitter:

entered into 11 challenges

contributed 0 challenges