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

Assign list - 145 entries

Assign list elements to matrix

  • Best score: 30
  • Best player score: 73
  • Number of attempts: 2
Counting in binary - 364 entries

"a" represents 0; "A" represents 1. Start from zero and count to 15.

  • Best score: 16
  • Best player score: 54
  • Number of attempts: 5
lamb had a little Mary - 464 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 38
  • Number of attempts: 1
attr_aligner - 2847 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 31
  • Number of attempts: 2
Going underground.... - 277 entries

Simple reformatting: in this case changing from the format London underground supplies its customers with, to the format that Google Calendar likes...

  • Best score: 22
  • Best player score: 29
  • Number of attempts: 3
Vertical Limit - 2063 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 24
  • Number of attempts: 8
Hole-in-one - 935 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 22
  • Number of attempts: 2
Parsing with CSV: Unify lines and result. - 162 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
  • Number of attempts: 2
vim = 22 / 7 - 398 entries

pi square vim

  • Best score: 20
  • Best player score: 20
  • Number of attempts: 8
Increment, increment, increment.... - 479 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Number of attempts: 2
Switch function arguments - 1795 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 6
remove dupes from array - 1179 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: 23
  • Number of attempts: 3
Make it more readable - 1719 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 8
VimGolfNight - 451 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 1
Simple text editing with Vim - 10126 entries

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

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 8
paste indent correction - JS - 75 entries

You copy some javascript code from a website and paste it into vim, it does not look good!

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 4
switch variable - 4189 entries

how fast can you switch two variable ?

  • Best score: 3
  • Best player score: 13
  • Number of attempts: 1
Remove semicolons after expressions - 441 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 6
  • Number of attempts: 3
The meaning - 491 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
quotes inside quotes - 2684 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 2
  • Best player score: 14
  • Number of attempts: 4
moo goo
Twitter:

entered into 20 challenges

contributed 0 challenges