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

Simple, Practical, and Common - 33724 entries

Simple things we do all the time should be able to be done with very few keystrokes, but sometimes I find something I need to do makes me go, "There MUST be a better way." This challenge is just a simple movement and entering text at a certain place.

  • Best score: 22
  • Best player score: 27
  • Position: #3917 / 7442
  • Number of attempts: 4
V to the i - 4813 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #54 / 1897
  • Number of attempts: 3
Add semicolons - 10881 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1844 / 3072
  • Number of attempts: 1
Just the middle - 11484 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3348 / 4209
  • Number of attempts: 2
Extended Customer 2 - 49 entries

Format the chars

  • Best score: 47
  • Best player score: 73
  • Position: #14 / 21
  • Number of attempts: 2
I forgot quotes - 16022 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2439 / 4189
  • Number of attempts: 3
Do you demand a shrubbery? - 1158 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 23
  • Position: #187 / 300
  • Number of attempts: 1
Don't know what this is - 2024 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: #479 / 586
  • Number of attempts: 2
paste indent correction - JS - 112 entries

You copy some javascript code from a website and paste it into vim, it does not look good!

  • Best score: 16
  • Best player score: 16
  • Position: #6 / 59
  • Number of attempts: 2
Delete unwanted lines - 423 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #31 / 231
  • Number of attempts: 1
Lookahead and Lookbehind - 70 entries

Look everywhere

  • Best score: 16
  • Best player score: 26
  • Position: #27 / 31
  • Number of attempts: 1
Minimalist Limerick - 520 entries

Reproduce this lovely poem.

  • Best score: 30
  • Best player score: 37
  • Position: #101 / 174
  • Number of attempts: 3
Enumerate words - 254 entries

Enumerate the unique words in order.

  • Best score: 23
  • Best player score: 27
  • Position: #59 / 91
  • Number of attempts: 1
Block Fun 1 - 210 entries

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 24
  • Position: #56 / 75
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 425 entries

Someone has vandalized this text file and replaced the beginning character of one word in each line with a Big "X." Please remove the big X's, and fix each line to read "The Quick Brown Fox Jumps Over The Lazy Dog."

  • Best score: 8
  • Best player score: 10
  • Position: #54 / 193
  • Number of attempts: 2
lamb had a little Mary - 618 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 39
  • Position: #128 / 169
  • Number of attempts: 1
Saving the hashes(#) - 2063 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 29
  • Position: #311 / 480
  • Number of attempts: 1
Vertical Limit - 2552 entries

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

  • Best score: 21
  • Best player score: 24
  • Position: #275 / 757
  • Number of attempts: 7
Alphabetize the directory - 298 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 39
  • Position: #80 / 101
  • Number of attempts: 1
Numbering a List - 1935 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 25
  • Position: #527 / 654
  • Number of attempts: 1
Change the content of a string - 1593 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #372 / 594
  • Number of attempts: 1
Simple text editing with Vim - 12996 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #139 / 3739
  • Number of attempts: 4
Joshua Draper
Twitter:

entered into 22 challenges

contributed 0 challenges