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

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
  • Number of attempts: 2
Cleanining up 80 column concatenated text - 184 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
  • 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: 32
  • Number of attempts: 4
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
  • 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: 6
Ugly spreadsheet copy/paste to CSV - 731 entries

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

  • Best score: 19
  • Best player score: 21
  • Number of attempts: 3
Append semicolon after expressions - 869 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 3
Switch function arguments - 1841 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 11
  • Number of attempts: 3
constructor - 162 entries

coding a constructor for a simple class

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

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Number of attempts: 2
replacing each line of a block selection - 2542 entries

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

  • Best score: 18
  • Best player score: 21
  • Number of attempts: 1
The meaning - 502 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Number of attempts: 1
switch variable - 4342 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Number of attempts: 1
Inconsistent real estate paste - 142 entries

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

  • Best score: 24
  • Best player score: 42
  • Number of attempts: 1
Simple text editing with Vim - 10535 entries

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

  • Best score: 13
  • Best player score: 14
  • Number of attempts: 2
Just the middle - 9421 entries

Delete the instructions at the top and bottom.

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

We should all ace this, right?

  • Best score: 14
  • Best player score: 16
  • Number of attempts: 1
Reverse and double space - 408 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 15
  • Number of attempts: 1
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: 15
  • Number of attempts: 1
Tibor Claassen
Twitter:

entered into 19 challenges

contributed 0 challenges