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

Switch function arguments - 1876 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
Append semicolon after expressions - 892 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 6
quotes inside quotes - 2942 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
Letter case trickery - 1461 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
Simple text editing with Vim - 11015 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
abcd > a b c d - 248 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Number of attempts: 1
Search and Replace 0 - 4434 entries

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

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
Vertical Limit - 2230 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
remove dupes from array - 1258 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
Minimalist Limerick - 493 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 35
  • Number of attempts: 4
Words in parens - 11996 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 14
  • Number of attempts: 5
Pairs of numbers - 338 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
Braces or Brackets? - 643 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
Delete unwanted lines - 347 entries

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

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 1
attr_aligner - 3237 entries

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

  • Best score: 19
  • Best player score: 31
  • Number of attempts: 3
VimGolfNight - 469 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
Numbering a List - 1760 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Number of attempts: 6
Split the words - 338 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
Let's play some Ivmgolf - 968 entries

Oops, I spelled that wrong.

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

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 2
Daniel Marjenburgh
Twitter:

entered into 20 challenges

contributed 0 challenges