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 - 32910 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 / 7271
  • Number of attempts: 6
Search and Replace 0 - 4654 entries

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

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

"vim vi improved"

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

Delete the instructions at the top and bottom.

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

Renumbering Basic.

  • Best score: 11
  • Best player score: 14
  • Position: #386 / 1228
  • Number of attempts: 11
Add to end of each line... kinda - 289 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 / 156
  • Number of attempts: 2
Vim's not included features - 178 entries

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

  • Best score: 23
  • Best player score: 36
  • Position: #45 / 59
  • Number of attempts: 2
Mirror Symmetry - 781 entries

Add backslashes.

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

Simple problem but looking for interesting solutions.

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

Convert to comma separated list.

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

Oops.

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

Just testing.

  • Best score: 18
  • Best player score: 18
  • Position: #46 / 112
  • Number of attempts: 3
quotes inside quotes - 3026 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: #207 / 1044
  • Number of attempts: 4
Hole-in-one - 973 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: #243 / 297
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1508 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 / 424
  • Number of attempts: 5
Happy New Year! - 139 entries

This is a simple new year's challenge.

  • Best score: 22
  • Best player score: 24
  • Position: #12 / 56
  • Number of attempts: 4
A Simple One - 924 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 / 612
  • Number of attempts: 2
Table Reshuffle - 349 entries

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

  • Best score: 22
  • Best player score: 39
  • Position: #93 / 127
  • Number of attempts: 1
Context Insensitive completion 1 - 427 entries

Finish writing this simple Python HTTP server.

  • Best score: 18
  • Best player score: 18
  • Position: #24 / 222
  • Number of attempts: 1
Simple text editing with Vim - 11637 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 / 3413
  • Number of attempts: 6
Kevin Merlin
Twitter:

entered into 20 challenges

contributed 0 challenges