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

Rural Post - 4462 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 17
  • Position: #798 / 1093
  • Number of attempts: 1
Simple, Practical, and Common - 33584 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: 28
  • Position: #4170 / 7407
  • Number of attempts: 3
V to the i - 4798 entries

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

  • Best score: 7
  • Best player score: 9
  • Position: #1646 / 1891
  • Number of attempts: 1
Box it - 7902 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 29
  • Position: #1338 / 1874
  • Number of attempts: 1
Extract argument from function - 2355 entries

The aim is to see if you can do some refactoring very fast.

  • Best score: 13
  • Best player score: 17
  • Position: #612 / 752
  • Number of attempts: 2
Search and Replace 0 - 4970 entries

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

  • Best score: 12
  • Best player score: 18
  • Position: #1369 / 1618
  • Number of attempts: 1
That hyphen - 2595 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 12
  • Position: #449 / 701
  • Number of attempts: 2
Just the middle - 11423 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 10
  • Position: #3730 / 4185
  • Number of attempts: 2
Basic renumbering - 5645 entries

Renumbering Basic.

  • Best score: 11
  • Best player score: 24
  • Position: #1115 / 1263
  • Number of attempts: 2
Vice versa - 7903 entries

Little role switching.

  • Best score: 12
  • Best player score: 19
  • Position: #1799 / 2125
  • Number of attempts: 2
comments galore - 1041 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 11
  • Position: #325 / 423
  • Number of attempts: 1
lipsum lines - 273 entries

Convert a quoted block of text into strings in a list.

  • Best score: 28
  • Best player score: 37
  • Position: #81 / 94
  • Number of attempts: 2
Replace and keep the case - 437 entries

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

  • Best score: 26
  • Best player score: 34
  • Position: #102 / 118
  • Number of attempts: 2
Alsa configuration - 513 entries

I'm tweaking my ~/.asoundrc file!

  • Best score: 22
  • Best player score: 36
  • Position: #111 / 128
  • Number of attempts: 2
Swap assigned value - 643 entries

Simple problem but looking for interesting solutions.

  • Best score: 10
  • Best player score: 12
  • Position: #208 / 253
  • Number of attempts: 1
Collect List - 4298 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 18
  • Position: #1047 / 1190
  • Number of attempts: 2
Space out the alphabet - 1657 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 23
  • Position: #358 / 444
  • Number of attempts: 2
Happy TvvO - 426 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #107 / 205
  • Number of attempts: 3
I forgot quotes - 15967 entries

Oops.

  • Best score: 10
  • Best player score: 17
  • Position: #2842 / 4174
  • Number of attempts: 2
-a-b-c- - 3213 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #947 / 1137
  • Number of attempts: 2
Count both ways - 1022 entries

Right AND down.

  • Best score: 13
  • Best player score: 17
  • Position: #310 / 354
  • Number of attempts: 2
NBCU Weekly Challenge - Test - 253 entries

Just testing.

  • Best score: 18
  • Best player score: 19
  • Position: #73 / 116
  • Number of attempts: 3
Lisp Condense - 460 entries

Reduce 4 cons selection operations down to one function call.

  • Best score: 13
  • Best player score: 15
  • Position: #100 / 158
  • Number of attempts: 2
Don't know what this is - 2014 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: 16
  • Position: #505 / 582
  • Number of attempts: 1
Two become one - 713 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: 34
  • Position: #138 / 208
  • Number of attempts: 2
Where should I put the Newline? - 881 entries

Help me put the newline.

  • Best score: 7
  • Best player score: 8
  • Position: #374 / 437
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10657 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2760 / 3679
  • Number of attempts: 1
quotes inside quotes - 3154 entries

taken from tip 85 of the very good book 'Practical Vim: Edit Text at the Speed of Thought' ! I'd be interested what people use :)

  • Best score: 14
  • Best player score: 17
  • Position: #878 / 1075
  • Number of attempts: 1
Words in parens - 12928 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 18
  • Position: #2891 / 3960
  • Number of attempts: 1
Prefixes and suffixes - 629 entries

Generate all prefixes of "vimchallenge", then all suffixes.

  • Best score: 17
  • Best player score: 28
  • Position: #130 / 196
  • Number of attempts: 1
The name of the game - 665 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #205 / 360
  • Number of attempts: 2
lamb had a little Mary - 598 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 39
  • Position: #131 / 165
  • Number of attempts: 1
Let's play some Ivmgolf - 1118 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 12
  • Position: #400 / 445
  • Number of attempts: 1
Vertical Limit - 2538 entries

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

  • Best score: 21
  • Best player score: 29
  • Position: #636 / 754
  • Number of attempts: 2
Append semicolon after expressions - 1046 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 15
  • Position: #387 / 413
  • Number of attempts: 1
Remove noise from HTTP log - 717 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: 17
  • Position: #227 / 273
  • Number of attempts: 3
switch variable - 5067 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1397 / 1746
  • Number of attempts: 1
The meaning - 574 entries

Numbers are fun!

  • Best score: 5
  • Best player score: 5
  • Position: #257 / 362
  • Number of attempts: 1
Ruby 1.9 hashes - 1236 entries

Rubyists talk about being cutting edge but how many are using 1.9 in production? Time to convert those verbose 1.8 hashes in to symbolic, succinct 1.9 beauties!

  • Best score: 12
  • Best player score: 18
  • Position: #348 / 404
  • Number of attempts: 3
Shebangs for all - 1982 entries

We've all seen or used a shebang once or twice. Ditch the specific paths and leave just a dynamic Ruby and Python bath behind.

  • Best score: 11
  • Best player score: 16
  • Position: #322 / 510
  • Number of attempts: 2
A Simple One - 1043 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
  • Position: #423 / 659
  • Number of attempts: 1
Reverse Simple Deletion - 845 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #317 / 457
  • Number of attempts: 1
The Cake is a Lie - 1330 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 11
  • Position: #445 / 523
  • Number of attempts: 1
Sort and add attributes - 1421 entries

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

  • Best score: 33
  • Best player score: 36
  • Position: #422 / 552
  • Number of attempts: 1
Simple text editing with Vim - 12680 entries

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

  • Best score: 13
  • Best player score: 17
  • Position: #2450 / 3665
  • Number of attempts: 1
Etienne Tremel
Twitter:

Cloud Engineer @kogusenn

entered into 45 challenges

contributed 0 challenges