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 - 32879 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
  • Position: #2399 / 7266
  • Number of attempts: 6
Just the middle - 11119 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3145 / 4108
  • Number of attempts: 1
O Christmas Tree - 99 entries

Design a macro that makes trees grow (or ASCII triangles, if that's too hard).

  • Best score: 22
  • Best player score: 26
  • Position: #13 / 40
  • Number of attempts: 2
Condensed Cases - 744 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: 15
  • Position: #140 / 228
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10531 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1597 / 3636
  • Number of attempts: 2
Words in parens - 12721 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #1992 / 3914
  • Number of attempts: 1
Changing URL path in CSS - 113 entries

What's the quickest way to swap out all the URLs in a CSS file? Is it wasted keystrokes using look-behinds and look-aheads? (I'm sorry for the delete/report--I made a mistake with the last one requiring an ugly search for graphic to replace with images. I just intended this to be a simple search and replace that might possibly generate some macros or normals solutions that are quicker)

  • Best score: 40
  • Best player score: 40
  • Position: #5 / 56
  • Number of attempts: 2
Cleanining up 80 column concatenated text - 185 entries

1. Put the whole query on one line, remove the concatenation operators 2. Remove the double spaces that appear a few times in the query 3. Use string-interpolated variable statementPid rather than the ugly concatenation

  • Best score: 31
  • Best player score: 39
  • Position: #32 / 74
  • Number of attempts: 2
Inconsistent real estate paste - 166 entries

Format a hand-typed real estate listing that uses inconsistent punctuation into four sections

  • Best score: 24
  • Best player score: 42
  • Position: #35 / 52
  • Number of attempts: 1
Exchanging Quotes - 791 entries

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

  • Best score: 30
  • Best player score: 32
  • Position: #42 / 218
  • Number of attempts: 4
replacing each line of a block selection - 2777 entries

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

  • Best score: 18
  • Best player score: 21
  • Position: #320 / 731
  • Number of attempts: 1
Switch function arguments - 1967 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Position: #10 / 624
  • Number of attempts: 3
Append semicolon after expressions - 939 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Position: #131 / 383
  • Number of attempts: 3
Reverse and double space - 441 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 15
  • Position: #68 / 182
  • Number of attempts: 1
constructor - 165 entries

coding a constructor for a simple class

  • Best score: 59
  • Best player score: 125
  • Position: #43 / 56
  • Number of attempts: 4
switch variable - 4901 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1020 / 1698
  • Number of attempts: 1
The meaning - 520 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #33 / 335
  • Number of attempts: 1
Ugly spreadsheet copy/paste to CSV - 817 entries

convert an ugly spreadsheet copy/paste into a CSV format.

  • Best score: 19
  • Best player score: 21
  • Position: #34 / 172
  • Number of attempts: 3
Simple text editing with Vim - 11589 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1119 / 3402
  • Number of attempts: 2
Tibor Claassen
Twitter:

entered into 19 challenges

contributed 0 challenges