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 - 4695 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #917 / 1556
  • Number of attempts: 1
VimGolfNight - 507 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #112 / 332
  • Number of attempts: 3
Split the words - 354 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: #33 / 107
  • Number of attempts: 3
attr_aligner - 3402 entries

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

  • Best score: 19
  • Best player score: 31
  • Position: #384 / 685
  • Number of attempts: 3
Letter case trickery - 1558 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: #453 / 501
  • Number of attempts: 1
quotes inside quotes - 3051 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
  • Position: #379 / 1050
  • Number of attempts: 4
Words in parens - 12769 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #163 / 3925
  • Number of attempts: 5
Pairs of numbers - 346 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: #80 / 130
  • Number of attempts: 3
Delete unwanted lines - 387 entries

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

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

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 35
  • Position: #76 / 168
  • Number of attempts: 4
abcd > a b c d - 267 entries

transform the single spaces into 4 spaces repeat for each line

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

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #208 / 422
  • Number of attempts: 1
Vertical Limit - 2383 entries

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

  • Best score: 21
  • Best player score: 25
  • Position: #323 / 721
  • Number of attempts: 1
Switch function arguments - 1995 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #239 / 631
  • Number of attempts: 2
Append semicolon after expressions - 968 entries

Some lines need the semicolon, some don't.

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

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #216 / 1712
  • Number of attempts: 2
remove dupes from array - 1308 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: #222 / 327
  • Number of attempts: 2
Numbering a List - 1834 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #235 / 629
  • Number of attempts: 6
Braces or Brackets? - 713 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: #71 / 253
  • Number of attempts: 2
Simple text editing with Vim - 11708 entries

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

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

entered into 20 challenges

contributed 0 challenges