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 - 33385 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: #3793 / 7364
  • Number of attempts: 2
prepend * to every non-blank line - 6208 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 10
  • Position: #89 / 1517
  • Number of attempts: 6
Applying same text modification in several lines - 2845 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 13
  • Position: #31 / 840
  • Number of attempts: 4
Box it - 7828 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 22
  • Position: #472 / 1865
  • Number of attempts: 3
html paragraph to table - 590 entries

reformat html paragraph to table

  • Best score: 48
  • Best player score: 86
  • Position: #108 / 123
  • Number of attempts: 1
Copy three lines - 2840 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 13
  • Position: #17 / 635
  • Number of attempts: 7
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #1093 / 4164
  • Number of attempts: 5
Team names - 1805 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 18
  • Position: #336 / 581
  • Number of attempts: 3
Todo list specification - 385 entries

The every item on the todo list must be done today. Modify the list to reflect that.

  • Best score: 37
  • Best player score: 37
  • Position: #32 / 176
  • Number of attempts: 4
Wrap text in quotes - 349 entries

All the blocks of text should be wrapped in quotation marks.

  • Best score: 16
  • Best player score: 16
  • Position: #14 / 120
  • Number of attempts: 4
C Reformatting - 688 entries

You may use Visual mode... or not. #uppercase

  • Best score: 30
  • Best player score: 63
  • Position: #126 / 161
  • Number of attempts: 1
quotes inside quotes - 3125 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: 14
  • Position: #10 / 1072
  • Number of attempts: 6
Number an outline - 249 entries

The indent and words are right, but the numbers are all wrong.

  • Best score: 25
  • Best player score: 64
  • Position: #52 / 75
  • Number of attempts: 4
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #1881 / 3946
  • Number of attempts: 6
Pairs of numbers - 360 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: 27
  • Position: #14 / 133
  • Number of attempts: 4
Draw the Go board - 140 entries

which is a 19×19 lines board. Here we use ascii characters only for simplicity. See diff file to get a sense. (See also http://en.wikipedia.org/wiki/Go_(game))

  • Best score: 50
  • Best player score: 51
  • Position: #4 / 48
  • Number of attempts: 7
Hole-in-one - 1012 entries

Lets take this golf thing literally.. Drive off the tee into the hole, and of course you don't strike the ball completely clean.

  • Best score: 15
  • Best player score: 16
  • Position: #12 / 302
  • Number of attempts: 4
Lookahead and Lookbehind - 67 entries

Look everywhere

  • Best score: 16
  • Best player score: 22
  • Position: #19 / 29
  • Number of attempts: 3
Vertical Limit - 2448 entries

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

  • Best score: 21
  • Best player score: 25
  • Position: #322 / 738
  • Number of attempts: 2
replacing each line of a block selection - 2947 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 19
  • Position: #135 / 768
  • Number of attempts: 5
Simple text editing with Vim - 12290 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1059 / 3581
  • Number of attempts: 4
Andy Balaam
Twitter:

he/him

entered into 21 challenges

contributed 0 challenges