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

V to the i - 4848 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Position: #1029 / 1907
  • Number of attempts: 4
Search and Replace 0 - 5089 entries

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

  • Best score: 12
  • Best player score: 16
  • Position: #1222 / 1658
  • Number of attempts: 2
Just the middle - 11572 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 11
  • Position: #3940 / 4240
  • Number of attempts: 1
camel riding - 796 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 42
  • Position: #278 / 282
  • Number of attempts: 1
Space out the alphabet - 1686 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 45
  • Position: #445 / 451
  • Number of attempts: 1
Mute the second method of this script - 460 entries

prepend a # infront of every line of the second method

  • Best score: 8
  • Best player score: 13
  • Position: #240 / 242
  • Number of attempts: 3
Condensed Cases - 820 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 16
  • Position: #186 / 251
  • Number of attempts: 2
I forgot quotes - 16176 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3144 / 4216
  • Number of attempts: 1
-a-b-c- - 3229 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #932 / 1142
  • Number of attempts: 3
Don't know what this is - 2036 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 16
  • Position: #489 / 589
  • Number of attempts: 3
attr_aligner - 3541 entries

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

  • Best score: 19
  • Best player score: 39
  • Position: #626 / 707
  • Number of attempts: 1
quotes inside quotes - 3191 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: 17
  • Position: #868 / 1088
  • Number of attempts: 1
Let's play some Ivmgolf - 1141 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 13
  • Position: #424 / 453
  • Number of attempts: 1
Simple text editing with Vim - 13468 entries

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

  • Best score: 13
  • Best player score: 16
  • Position: #2321 / 3865
  • Number of attempts: 5
Andrew Larson
Twitter:

entered into 14 challenges

contributed 0 challenges