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

Search and Replace 0 - 4575 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #886 / 1515
  • Number of attempts: 1
VimGolfNight - 482 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #112 / 322
  • Number of attempts: 3
Split the words - 346 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
  • Position: #32 / 104
  • Number of attempts: 3
attr_aligner - 3350 entries

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

  • Best score: 19
  • Best player score: 31
  • Position: #379 / 678
  • Number of attempts: 3
Letter case trickery - 1517 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
  • Position: #445 / 493
  • Number of attempts: 1
quotes inside quotes - 2996 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: 3
  • Best player score: 15
  • Position: #371 / 1037
  • Number of attempts: 4
Words in parens - 12682 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #155 / 3905
  • Number of attempts: 5
Pairs of numbers - 340 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
  • Position: #77 / 126
  • Number of attempts: 3
Delete unwanted lines - 350 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #100 / 210
  • Number of attempts: 1
Minimalist Limerick - 500 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 35
  • Position: #74 / 165
  • Number of attempts: 4
abcd > a b c d - 250 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #112 / 197
  • Number of attempts: 1
Let's play some Ivmgolf - 979 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #203 / 407
  • Number of attempts: 1
Vertical Limit - 2310 entries

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

  • Best score: 21
  • Best player score: 25
  • Position: #313 / 702
  • Number of attempts: 1
Switch function arguments - 1945 entries

How to switch two arguments of a function.

  • Best score: 3
  • Best player score: 12
  • Position: #234 / 618
  • Number of attempts: 2
Append semicolon after expressions - 923 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #60 / 375
  • Number of attempts: 6
switch variable - 4865 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #216 / 1689
  • Number of attempts: 2
remove dupes from array - 1260 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: #216 / 321
  • Number of attempts: 2
Numbering a List - 1777 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #218 / 611
  • Number of attempts: 6
Braces or Brackets? - 645 entries

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

  • Best score: 34
  • Best player score: 40
  • Position: #65 / 240
  • Number of attempts: 2
Simple text editing with Vim - 11391 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1084 / 3347
  • Number of attempts: 2
Daniel Marjenburgh
Twitter:

entered into 20 challenges

contributed 0 challenges