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 - 33379 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: 48
  • Position: #7242 / 7363
  • Number of attempts: 1
Swap values - 4543 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 21
  • Position: #1169 / 1257
  • Number of attempts: 1
V to the i - 4751 entries

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

  • Best score: 7
  • Best player score: 11
  • Position: #1786 / 1879
  • 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: 50
  • Position: #629 / 635
  • Number of attempts: 1
That hyphen - 2556 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 14
  • Position: #573 / 695
  • Number of attempts: 1
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 11
  • Position: #3894 / 4164
  • Number of attempts: 1
Vice versa - 7797 entries

Little role switching.

  • Best score: 12
  • Best player score: 19
  • Position: #1788 / 2099
  • Number of attempts: 1
Paragraph sort - 430 entries

My large herbivorous mammals, Vim commands, and POSIX utilities need to be sorted separately.

  • Best score: 14
  • Best player score: 41
  • Position: #121 / 123
  • Number of attempts: 1
comments galore - 998 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 12
  • Position: #374 / 418
  • Number of attempts: 1
Mirrored text - 163 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 17
  • Position: #57 / 69
  • Number of attempts: 1
A grid of punctuation - 124 entries

Create a checkerboard of = and - in an 80×24 grid!

  • Best score: 16
  • Best player score: 23
  • Position: #55 / 57
  • Number of attempts: 1
Generate a list of numbers - 283 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 16
  • Position: #114 / 136
  • Number of attempts: 1
Collect List - 4264 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 18
  • Position: #1050 / 1186
  • Number of attempts: 1
camel riding - 769 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 20
  • Position: #257 / 274
  • Number of attempts: 1
Mute the second method of this script - 447 entries

prepend a # infront of every line of the second method

  • Best score: 9
  • Best player score: 9
  • Position: #114 / 237
  • Number of attempts: 1
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3168 / 4161
  • Number of attempts: 1
-a-b-c- - 3176 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 18
  • Position: #1046 / 1129
  • Number of attempts: 1
Count both ways - 1001 entries

Right AND down.

  • Best score: 13
  • Best player score: 18
  • Position: #322 / 351
  • Number of attempts: 1
Gray area - 732 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 15
  • Position: #245 / 268
  • Number of attempts: 1
Don't know what this is - 1978 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: 18
  • Position: #555 / 578
  • 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: 18
  • Position: #970 / 1072
  • Number of attempts: 1
Words in parens - 12854 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 34
  • Position: #3889 / 3945
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1581 entries

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

  • Best score: 8
  • Best player score: 9
  • Position: #227 / 439
  • Number of attempts: 2
Numbering a List - 1859 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 22
  • Position: #437 / 639
  • Number of attempts: 1
Micha
Twitter:

entered into 24 challenges

contributed 0 challenges