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 - 33982 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: #7380 / 7508
  • Number of attempts: 1
Swap values - 4703 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 21
  • Position: #1198 / 1291
  • Number of attempts: 1
V to the i - 4864 entries

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

  • Best score: 7
  • Best player score: 11
  • Position: #1815 / 1912
  • Number of attempts: 1
Copy three lines - 2911 entries

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

  • Best score: 13
  • Best player score: 50
  • Position: #639 / 645
  • Number of attempts: 1
That hyphen - 2624 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 14
  • Position: #580 / 708
  • Number of attempts: 1
Just the middle - 11611 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 11
  • Position: #3966 / 4252
  • Number of attempts: 1
Vice versa - 8011 entries

Little role switching.

  • Best score: 12
  • Best player score: 19
  • Position: #1828 / 2153
  • Number of attempts: 1
Paragraph sort - 456 entries

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

  • Best score: 14
  • Best player score: 41
  • Position: #124 / 126
  • Number of attempts: 1
comments galore - 1079 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 12
  • Position: #385 / 431
  • Number of attempts: 1
Mirrored text - 199 entries

backward and forward, and long enough to be challenging

  • Best score: 14
  • Best player score: 17
  • Position: #62 / 74
  • Number of attempts: 1
A grid of punctuation - 145 entries

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

  • Best score: 16
  • Best player score: 23
  • Position: #60 / 63
  • Number of attempts: 1
Generate a list of numbers - 302 entries

Please generate list of numbers from 1 to 20.

  • Best score: 14
  • Best player score: 16
  • Position: #119 / 142
  • Number of attempts: 1
Collect List - 4333 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 18
  • Position: #1060 / 1197
  • Number of attempts: 1
camel riding - 798 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 20
  • Position: #265 / 283
  • Number of attempts: 1
Mute the second method of this script - 461 entries

prepend a # infront of every line of the second method

  • Best score: 8
  • Best player score: 9
  • Position: #115 / 243
  • Number of attempts: 1
I forgot quotes - 16185 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3210 / 4221
  • Number of attempts: 1
-a-b-c- - 3237 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 18
  • Position: #1060 / 1145
  • Number of attempts: 1
Count both ways - 1037 entries

Right AND down.

  • Best score: 13
  • Best player score: 18
  • Position: #330 / 359
  • Number of attempts: 1
Gray area - 757 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 15
  • Position: #249 / 274
  • Number of attempts: 1
Don't know what this is - 2048 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: #569 / 592
  • Number of attempts: 1
quotes inside quotes - 3200 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: #984 / 1091
  • Number of attempts: 1
Words in parens - 13033 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 34
  • Position: #3931 / 3987
  • Number of attempts: 1
SFD-ROC: vimvimvim - 1641 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: #232 / 456
  • Number of attempts: 2
Numbering a List - 1944 entries

Pretty simple, number the list.

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

entered into 24 challenges

contributed 0 challenges