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

Make HTML List - 903 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 46
  • Number of attempts: 2
Exchanging Quotes - 761 entries

Sometimes you need to exchange a choice of quotes in some code.

  • Best score: 30
  • Best player score: 37
  • Number of attempts: 1
Replace and keep the case - 347 entries

Replace all instance of plugin and Plugin to device and Device.

  • Best score: 26
  • Best player score: 26
  • Number of attempts: 4
Two become one - 676 entries

We have two c arrays and want to make one two dimensional out of it. Can we do that?

  • Best score: 25
  • Best player score: 25
  • Number of attempts: 9
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: 25
  • Number of attempts: 7
Change the content of a string - 1238 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 22
  • Number of attempts: 3
multiple cursor alternative - 1101 entries

from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/

  • Best score: 19
  • Best player score: 21
  • 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: 19
  • Number of attempts: 5
Adam's challenge - 804 entries

Change both normal to bold and 4 by 2. Adam Wathan challenge this on twitter . He did it in 11 keystrokes on Sublime.

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 4
replace 2nd column blanks with values in same column if blank - 183 entries

Where ,SOMELOGB and ,SOMELOGC replaces each /r carriage return if 2nd column is blank. The replace only happens if 2nd column is blank though and should replace up to the non blank row.

  • Best score: 15
  • Best player score: 18
  • Number of attempts: 1
I forgot quotes - 12148 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Number of attempts: 5
Nesting SASS - 222 entries

Move a block inside another block and indent it

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 4
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: 9
  • Number of attempts: 1
Swap values - 3617 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
A HAPPY NEW YEAR 2014 ! - 9599 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 4
Copy three lines - 2128 entries

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

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 8
Letter case trickery - 1448 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
  • Number of attempts: 4
Just the middle - 9421 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Number of attempts: 2
A Simple One - 845 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 2
Words in parens - 11169 entries

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 3
Let's play some Ivmgolf - 921 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 7
  • Number of attempts: 2
The Cake is a Lie - 1127 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 9
  • Number of attempts: 6
Vice versa - 6064 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Number of attempts: 3
Vertical Limit - 2126 entries

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

  • Best score: 21
  • Best player score: 25
  • Number of attempts: 1
Paragraph breaks - 407 entries

Swap the blank lines and the aaa lines.

  • Best score: 10
  • Best player score: 13
  • Number of attempts: 2
Simple, Practical, and Common - 25708 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: 23
  • Number of attempts: 8
Fix the XML - 867 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 20
  • Number of attempts: 7
Fiddle percentages into real numbers - 724 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 13
  • Number of attempts: 3
One number per line - 13381 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 5
From A to B - 496 entries

Mirror and change this text block

  • Best score: 16
  • Best player score: 17
  • Number of attempts: 4
remove dupes from array - 1197 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
  • Number of attempts: 18
Simple addition - 234 entries

The right side of the equation is already there. We just need the left one now.

  • Best score: 12
  • Best player score: 13
  • Number of attempts: 1
Un"finnish"ed Work - 102 entries

Replace å by a, ä by a and ö by o.

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 3
Space out the alphabet - 1382 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 17
  • Number of attempts: 2
Scrambled numbers - 730 entries

Four is NOT 1. One is 1.

  • Best score: 18
  • Best player score: 18
  • Number of attempts: 5
Rami Hovi
Twitter:

Lawyer and logician who loves computers and command line. Entrepreneur at Law Office Oikeushovi. #VimUser, @QubesOS enthusiast

entered into 35 challenges

contributed 0 challenges