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

Logging with key - 275 entries

Sometimes it is better to log with meaningful key

  • Best score: 21
  • Best player score: 41
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 5524 entries

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

  • Best score: 32
  • Best player score: 38
  • Number of attempts: 3
Saving the hashes(#) - 1770 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: 30
  • Number of attempts: 1
Vertical Limit - 2126 entries

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

  • Best score: 21
  • Best player score: 27
  • Number of attempts: 2
I forgot quotes - 12156 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Number of attempts: 2
switch variable - 4342 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 2
V to the i - 3973 entries

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

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
-a-b-c- - 2635 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Number of attempts: 2
Line 'em up! - 275 entries

It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!

  • Best score: 17
  • Best player score: 21
  • Number of attempts: 1
Just the middle - 9424 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 7
Don't know what this is - 1769 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: 14
  • Number of attempts: 3
Collect List - 3544 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 14
  • Number of attempts: 1
readability - 285 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 19
  • Number of attempts: 1
Mirror Symmetry - 701 entries

Add backslashes.

  • Best score: 7
  • Best player score: 12
  • Number of attempts: 2
Mute the second method of this script - 412 entries

prepend a # infront of every line of the second method

  • Best score: 9
  • Best player score: 10
  • Number of attempts: 1
Count both ways - 878 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Number of attempts: 3
Where should I put the Newline? - 798 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 1
Simple, Practical, and Common - 25715 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: 29
  • Number of attempts: 1
Happy TvvO - 354 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 2
Search and Replace 0 - 4166 entries

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

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 6
A HAPPY NEW YEAR 2014 ! - 9600 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 15
  • Number of attempts: 3
camel riding - 693 entries

add a prefix on some camelCase variables

  • Best score: 15
  • Best player score: 16
  • Number of attempts: 3
remove all lines in first part - 149 entries

From the second part, remove all lines in the first part. It can be useful when you have done something from a long list, you want to know what is not done yet!

  • Best score: 13
  • Best player score: 22
  • Number of attempts: 2
Vice versa - 6064 entries

Little role switching.

  • Best score: 12
  • Best player score: 18
  • Number of attempts: 1
swap or reverse - 91 entries

Try to swap or reverse the line as needed.

  • Best score: 16
  • Best player score: 16
  • Number of attempts: 2
Do you demand a shrubbery? - 1016 entries

Use :redir and crush the emacsgolfers.

  • Best score: 15
  • Best player score: 17
  • Number of attempts: 5
Words in parens - 11172 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 2
Condensed Cases - 695 entries

Apple's new programming language, Swift, allows two style of case statements: 1) one Enum case on each line, or 2) multiple Enum cases on a single line. Convert the following from the first case (no pun intended) to the second type.

  • Best score: 12
  • Best player score: 17
  • Number of attempts: 1
Tom van der Lee
Twitter:

entered into 28 challenges

contributed 0 challenges