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

Braces or Brackets? - 627 entries

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

  • Best score: 34
  • Best player score: 40
  • Number of attempts: 2
Minimalist Limerick - 481 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 35
  • Number of attempts: 4
attr_aligner - 3075 entries

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

  • Best score: 19
  • Best player score: 31
  • Number of attempts: 3
Pairs of numbers - 325 entries

Line 1 represents x, line 2 y-data. Bring the corresponding pairs in the form "[x,y]\n"

  • Best score: 26
  • Best player score: 39
  • Number of attempts: 3
Vertical Limit - 2163 entries

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

  • Best score: 21
  • Best player score: 25
  • Number of attempts: 1
Numbering a List - 1747 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Number of attempts: 6
Letter case trickery - 1450 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 17
  • Number of attempts: 1
quotes inside quotes - 2833 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: 14
  • Best player score: 15
  • Number of attempts: 4
Append semicolon after expressions - 880 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 6
Let's play some Ivmgolf - 937 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Number of attempts: 1
switch variable - 4437 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 2
Search and Replace 0 - 4205 entries

Replace every instance of 'aaa' with 'xaaax'.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
Delete unwanted lines - 339 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
Switch function arguments - 1850 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
Simple text editing with Vim - 10656 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 2
Words in parens - 11363 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 5
Split the words - 334 entries

Add the spaces manually if you must, but if you use Vim's spell checking feature wisely, I think you'll save a LARGE number of strokes.

  • Best score: 18
  • Best player score: 34
  • Number of attempts: 3
remove dupes from array - 1220 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
  • Number of attempts: 2
VimGolfNight - 458 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
abcd > a b c d - 241 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
Daniel Marjenburgh
Twitter:

entered into 20 challenges

contributed 0 challenges