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 - 33353 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: #787 / 7358
  • Number of attempts: 6
One number per line - 18613 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1116 / 3841
  • Number of attempts: 7
Every other line - 2886 entries

AaAaAaA

  • Best score: 12
  • Best player score: 15
  • Position: #320 / 700
  • Number of attempts: 3
Just the middle - 11346 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2348 / 4160
  • Number of attempts: 4
Combines all items - 303 entries

For each line that starts with the same number I want to combine its contents

  • Best score: 9
  • Best player score: 9
  • Position: #40 / 137
  • Number of attempts: 1
Vice versa - 7778 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #248 / 2095
  • Number of attempts: 4
Order and join - 948 entries

There's something special about the input order.

  • Best score: 10
  • Best player score: 11
  • Position: #100 / 254
  • Number of attempts: 5
Scrambled numbers - 779 entries

Four is NOT 1. One is 1.

  • Best score: 18
  • Best player score: 20
  • Position: #66 / 182
  • Number of attempts: 10
Collect List - 4261 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #273 / 1185
  • Number of attempts: 3
I forgot quotes - 15922 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #528 / 4159
  • Number of attempts: 4
A HAPPY NEW YEAR 2014 ! - 10616 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1072 / 3663
  • Number of attempts: 4
attr_aligner - 3444 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 27
  • Position: #290 / 692
  • Number of attempts: 9
quotes inside quotes - 3124 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: #258 / 1071
  • Number of attempts: 5
Words in parens - 12848 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #734 / 3943
  • Number of attempts: 3
SFD-ROC: vimvimvim - 1569 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: #85 / 437
  • Number of attempts: 7
Saving the hashes(#) - 1992 entries

The following file is copied from vimcasts.org(Its only for learning purpose,hope the site owner doesn't mind it), its probably the easiest of challenges.Our goal is to delete every line which doesn't contain a hash signs. The remaining hash signs with numbers are then sorted to get the final output.

  • Best score: 20
  • Best player score: 34
  • Position: #426 / 473
  • Number of attempts: 1
Make it more readable - 1952 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Position: #80 / 640
  • Number of attempts: 12
remove dupes from array - 1332 entries

given a random string that contains a ruby-esque array, make sure that there are no duplicate elements

  • Best score: 17
  • Best player score: 17
  • Position: #68 / 330
  • Number of attempts: 10
Numbering a List - 1855 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 13
  • Position: #13 / 638
  • Number of attempts: 4
Shebangs for all - 1904 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 11
  • Position: #43 / 497
  • Number of attempts: 10
Get rid of html tags - 368 entries

Want to read more about Vim's background? Then get rid of those html tags...

  • Best score: 15
  • Best player score: 17
  • Position: #106 / 217
  • Number of attempts: 2
Simple text editing with Vim - 12230 entries

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

  • Best score: 13
  • Best player score: 13
  • Position: #457 / 3567
  • Number of attempts: 5
setNull
Twitter:

entered into 22 challenges

contributed 0 challenges