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 - 32904 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: #3825 / 7270
  • Number of attempts: 4
V to the i - 4639 entries

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

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

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1784 / 2988
  • Number of attempts: 1
Just the middle - 11136 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3272 / 4112
  • Number of attempts: 2
Extended Customer 2 - 44 entries

Format the chars

  • Best score: 47
  • Best player score: 73
  • Position: #12 / 19
  • Number of attempts: 2
I forgot quotes - 15728 entries

Oops.

  • Best score: 10
  • Best player score: 16
  • Position: #2385 / 4114
  • Number of attempts: 3
Do you demand a shrubbery? - 1105 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 23
  • Position: #182 / 291
  • Number of attempts: 1
Don't know what this is - 1948 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: #467 / 571
  • Number of attempts: 2
paste indent correction - JS - 92 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 / 53
  • Number of attempts: 2
Delete unwanted lines - 358 entries

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

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

Look everywhere

  • Best score: 16
  • Best player score: 26
  • Position: #26 / 29
  • Number of attempts: 1
Minimalist Limerick - 503 entries

Reproduce this lovely poem.

  • Best score: 31
  • Best player score: 37
  • Position: #98 / 167
  • Number of attempts: 3
Enumerate words - 232 entries

Enumerate the unique words in order.

  • Best score: 23
  • Best player score: 27
  • Position: #55 / 84
  • Number of attempts: 1
Block Fun 1 - 179 entries

Manipulate the columns to produce desired result.

  • Best score: 14
  • Best player score: 24
  • Position: #51 / 69
  • Number of attempts: 2
The Quick Brown Fox Jumps Over The Lazy Vim - 388 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: #49 / 180
  • Number of attempts: 2
lamb had a little Mary - 559 entries

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

  • Best score: 16
  • Best player score: 39
  • Position: #122 / 157
  • Number of attempts: 1
Saving the hashes(#) - 1961 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: #303 / 466
  • Number of attempts: 1
Vertical Limit - 2367 entries

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

  • Best score: 21
  • Best player score: 24
  • Position: #258 / 716
  • Number of attempts: 7
Alphabetize the directory - 269 entries

Put the contacts and their information in alphabetical order.

  • Best score: 30
  • Best player score: 39
  • Position: #76 / 97
  • Number of attempts: 1
Numbering a List - 1828 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 25
  • Position: #503 / 625
  • Number of attempts: 1
Change the content of a string - 1350 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #319 / 521
  • Number of attempts: 1
Simple text editing with Vim - 11624 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 / 3410
  • Number of attempts: 4
Joshua Draper
Twitter:

entered into 22 challenges

contributed 0 challenges