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 - 32746 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: 22
  • Position: #104 / 7235
  • Number of attempts: 6
Search and Replace 0 - 4534 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #405 / 1507
  • Number of attempts: 3
That hyphen - 2464 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 9
  • Position: #82 / 674
  • Number of attempts: 5
Just the middle - 11074 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #413 / 4088
  • Number of attempts: 2
Basic renumbering - 5393 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 14
  • Position: #378 / 1218
  • Number of attempts: 11
Add to end of each line... kinda - 285 entries

Visual-block mode can be used to add something to the end of each line, even if they are of differing lengths. However, what if it's not quite at the end?

  • Best score: 12
  • Best player score: 12
  • Position: #41 / 153
  • Number of attempts: 2
Vim's not included features - 168 entries

Filter not included (-) features in a hypothetical installation of vim.

  • Best score: 23
  • Best player score: 36
  • Position: #43 / 57
  • Number of attempts: 2
Mirror Symmetry - 746 entries

Add backslashes.

  • Best score: 7
  • Best player score: 7
  • Position: #38 / 256
  • Number of attempts: 3
Swap assigned value - 525 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 10
  • Position: #79 / 226
  • Number of attempts: 2
Collect List - 4146 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #85 / 1159
  • Number of attempts: 6
I forgot quotes - 15639 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #251 / 4095
  • Number of attempts: 6
NBCU Weekly Challenge - Test - 227 entries

Just testing.

  • Best score: 18
  • Best player score: 18
  • Position: #46 / 109
  • Number of attempts: 3
quotes inside quotes - 2996 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: 3
  • Best player score: 14
  • Position: #208 / 1037
  • Number of attempts: 4
Hole-in-one - 963 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: 22
  • Position: #240 / 294
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1441 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 8
  • Position: #73 / 411
  • Number of attempts: 5
Happy New Year! - 129 entries

This is a simple new year's challenge.

  • Best score: 22
  • Best player score: 24
  • Position: #12 / 54
  • Number of attempts: 4
A Simple One - 870 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #30 / 581
  • Number of attempts: 2
Table Reshuffle - 326 entries

Fix the column order in this table... also append the new 'username' column.

  • Best score: 22
  • Best player score: 39
  • Position: #89 / 121
  • Number of attempts: 1
Context Insensitive completion 1 - 405 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 18
  • Position: #24 / 212
  • Number of attempts: 1
Simple text editing with Vim - 11354 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #372 / 3335
  • Number of attempts: 6
Kevin Merlin
Twitter:

entered into 20 challenges

contributed 0 challenges