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

Search and Replace 0 - 4651 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #174 / 1541
  • Number of attempts: 4
Dehamlizing - 174 entries

Change this piece of HAML code back into erb

  • Best score: 32
  • Best player score: 42
  • Position: #41 / 67
  • 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: 53
  • Position: #45 / 56
  • Number of attempts: 2
NATO phonetic alphabet - 476 entries

Transform the series of words into a list.

  • Best score: 19
  • Best player score: 24
  • Position: #139 / 181
  • Number of attempts: 2
Create a pandoc compatible table - 176 entries

In [this vimcast][1], a featured gist from Tim Pope shows how to quickly make a simple table structure. How fast can you convert it to pandoc's markdown style? [1]: http://vimcasts.org/episodes/aligning-text-with-tabular-vim/

  • Best score: 32
  • Best player score: 49
  • Position: #34 / 50
  • Number of attempts: 1
SFD-ROC: Tic-Tac-Toe - 131 entries

Tic-Tac-Toe You are 'X', and it is your turn. Stop 'O' from winning, and complete the game. Draw a diagonal line through your winning row of three X's.

  • Best score: 25
  • Best player score: 40
  • Position: #41 / 49
  • Number of attempts: 3
SFD-ROC: The Quick Brown Fox - 160 entries

Someone has vandalized our text (again). Please fix to read: The Quick Brown Fox Jumps Over The Lazy Dog.

  • Best score: 24
  • Best player score: 28
  • Position: #46 / 97
  • Number of attempts: 1
The name of the game - 627 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #47 / 343
  • Number of attempts: 7
SFD-ROC: vimvimvim - 1508 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 15
  • Position: #380 / 424
  • Number of attempts: 3
SFD-ROC: Pipe Dreams - 93 entries

Move the pipes so they match the output.

  • Best score: 12
  • Best player score: 20
  • Position: #36 / 43
  • Number of attempts: 2
Stairs Indenting - 424 entries

Indent each line with <line number> whitespaces.

  • Best score: 12
  • Best player score: 14
  • Position: #60 / 183
  • Number of attempts: 1
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: 44
  • Position: #43 / 74
  • Number of attempts: 1
SFD-ROC: ROT13 Phonics - 79 entries

A is for apple, b is for ball, etc... This familiar phonics poem has been rotated 13 characters. Make the letter match the word.

  • Best score: 6
  • Best player score: 25
  • Position: #63 / 64
  • Number of attempts: 1
you're stuck on jQuery < 1.7 - 330 entries

replace calls to jQuery 1.7+'s `on` with calls to pre 1.7 `bind`

  • Best score: 25
  • Best player score: 96
  • Position: #107 / 107
  • Number of attempts: 1
Enharmonic Equivalents - 54 entries

Transform # and b to digraphs

  • Best score: 18
  • Best player score: 19
  • Position: #20 / 33
  • Number of attempts: 1
Vertical Limit - 2367 entries

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

  • Best score: 21
  • Best player score: 27
  • Position: #487 / 716
  • Number of attempts: 3
Aligning function arguments to match a specific coding style - 202 entries

Most projects have specific coding style guidelines. In this case, the argument list must be broken into a new line for each argument, with the argument names right aligned, taking into account pointers.

  • Best score: 16
  • Best player score: 22
  • Position: #43 / 64
  • Number of attempts: 3
replacing each line of a block selection - 2791 entries

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

  • Best score: 18
  • Best player score: 32
  • Position: #656 / 732
  • Number of attempts: 1
Switch function arguments - 1982 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 15
  • Position: #512 / 627
  • Number of attempts: 2
Append semicolon after expressions - 942 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 13
  • Position: #275 / 385
  • Number of attempts: 3
Reverse and double space - 445 entries

Reverse the order of the given lines and double space everything

  • Best score: 14
  • Best player score: 18
  • Position: #149 / 183
  • Number of attempts: 1
Remove noise from HTTP log - 660 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 15
  • Position: #53 / 260
  • Number of attempts: 3
Remove semicolons after expressions - 541 entries

A follow-up for http://vimgolf.com/challenges/4fc9d767d3a0d4000100000e.

  • Best score: 6
  • Best player score: 8
  • Position: #172 / 235
  • Number of attempts: 5
The meaning - 521 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 7
  • Position: #325 / 336
  • Number of attempts: 2
Turn this csv list into queries - 192 entries

Transform each line of this csv file into a MySQL-ready INSERT query.

  • Best score: 98
  • Best player score: 144
  • Position: #75 / 92
  • Number of attempts: 1
Context insensitive completion 0 - 468 entries

Buried in the lines you're not supposed to add is the line "Add this line!" Add that line to the top of the file.

  • Best score: 7
  • Best player score: 10
  • Position: #200 / 221
  • Number of attempts: 1
Remember FizzBuzz? - 587 entries

Output FizzBuzz to 100. Start with nothing.

  • Best score: 39
  • Best player score: 64
  • Position: #113 / 166
  • Number of attempts: 2
Change the content of a string - 1346 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 25
  • Position: #316 / 520
  • Number of attempts: 2
Sort and add attributes - 1183 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 37
  • Position: #379 / 482
  • Number of attempts: 2
Add fold markers to a .c file - 481 entries

Fold markers can make it easier to navigate source code. Add them to this .c file.

  • Best score: 30
  • Best player score: 36
  • Position: #87 / 157
  • Number of attempts: 2
Whitespace, empty lines and tabs - 2970 entries

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

  • Best score: 16
  • Best player score: 33
  • Position: #514 / 661
  • Number of attempts: 2
Simple text editing with Vim - 11619 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #2190 / 3408
  • Number of attempts: 5
Reformat/Refactor a Golfer Class - 5993 entries

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

  • Best score: 32
  • Best player score: 41
  • Position: #801 / 1478
  • Number of attempts: 2
Underhill Labs
Twitter:

Bike, garden, knit, compile. Creator of Knitting Stash, a knitting app for android.

entered into 33 challenges

contributed 0 challenges