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

One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1103 / 3842
  • Number of attempts: 4
V to the i - 4751 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #423 / 1879
  • Number of attempts: 3
Split line with dots - 2125 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 15
  • Position: #97 / 630
  • Number of attempts: 7
Every other line - 2886 entries

AaAaAaA

  • Best score: 12
  • Best player score: 16
  • Position: #378 / 700
  • Number of attempts: 3
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: 13
  • Position: #37 / 635
  • Number of attempts: 8
Extract argument from function - 2314 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 13
  • Position: #177 / 744
  • Number of attempts: 5
Start coding format - 147 entries

I used to start coding with following format: int main(){ -(cursor here) }

  • Best score: 22
  • Best player score: 22
  • Position: #17 / 70
  • Number of attempts: 2
Search and Replace 0 - 4792 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #824 / 1585
  • Number of attempts: 4
That hyphen - 2556 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 11
  • Position: #342 / 695
  • Number of attempts: 6
Just the middle - 11360 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3441 / 4164
  • Number of attempts: 2
Basic renumbering - 5587 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 14
  • Position: #461 / 1258
  • Number of attempts: 5
Vice versa - 7803 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1261 / 2100
  • Number of attempts: 1
7th Birthday - 186 entries

We have a bunch of numbers written from 0 to 9 in the order present in the text input file. The task is to create 7 by replacing the numbers with dashes.

  • Best score: 19
  • Best player score: 26
  • Position: #54 / 73
  • Number of attempts: 1
C Reformatting - 688 entries

You may use Visual mode... or not. #uppercase

  • Best score: 30
  • Best player score: 69
  • Position: #138 / 161
  • Number of attempts: 1
Paragraph breaks - 505 entries

Swap the blank lines and the aaa lines.

  • Best score: 10
  • Best player score: 11
  • Position: #67 / 165
  • Number of attempts: 3
Align commas - 1049 entries

There are 15,000 aligning challenges on vimgolf.com, and they're all exactly the same. I hope this one is a little different.

  • Best score: 11
  • Best player score: 15
  • Position: #119 / 241
  • Number of attempts: 5
Collect List - 4264 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 13
  • Position: #564 / 1186
  • Number of attempts: 8
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 18
  • Position: #3177 / 4161
  • 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: 12
  • Position: #200 / 578
  • Number of attempts: 4
A HAPPY NEW YEAR 2014 ! - 10624 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #2136 / 3666
  • Number of attempts: 2
Letter case trickery - 1594 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 10
  • Position: #151 / 511
  • Number of attempts: 5
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: 15
  • Position: #465 / 1072
  • Number of attempts: 2
Words in parens - 12858 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2334 / 3946
  • Number of attempts: 1
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: 20
  • Position: #44 / 473
  • Number of attempts: 8
Vertical Limit - 2440 entries

transform a succession of one word lines to a an array of strings

  • Best score: 21
  • Best player score: 28
  • Position: #583 / 737
  • Number of attempts: 2
replacing each line of a block selection - 2947 entries

replace each line's ../assets/js with /javascripts

  • Best score: 18
  • Best player score: 19
  • Position: #187 / 768
  • Number of attempts: 6
switch variable - 5036 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #900 / 1736
  • Number of attempts: 3
Numbering a List - 1859 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 13
  • Position: #12 / 639
  • Number of attempts: 1
Shebangs for all - 1912 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: 12
  • Position: #145 / 500
  • Number of attempts: 7
The Cake is a Lie - 1286 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Position: #227 / 512
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3339 entries

Convert tabs to spaces, strip empty lines and trailing whitespace.

  • Best score: 16
  • Best player score: 28
  • Position: #452 / 736
  • Number of attempts: 2
Simple text editing with Vim - 12290 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1527 / 3581
  • Number of attempts: 2
Reformat/Refactor a Golfer Class - 6560 entries

A simple case of removing unneeded code and fixing broken indentation.

  • Best score: 32
  • Best player score: 47
  • Position: #1222 / 1616
  • Number of attempts: 2
timerella®
Twitter:

sorry about the blessing the rains thing

entered into 33 challenges

contributed 0 challenges