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 - 33787 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: 26
  • Position: #3488 / 7454
  • Number of attempts: 5
Get mail address from outlook format - 649 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 17
  • Position: #131 / 204
  • Number of attempts: 5
Swap values - 4647 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 12
  • Position: #395 / 1276
  • Number of attempts: 5
prepend * to every non-blank line - 6358 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 11
  • Position: #538 / 1551
  • Number of attempts: 6
One number per line - 18798 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1075 / 3880
  • Number of attempts: 5
V to the i - 4824 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #859 / 1899
  • Number of attempts: 4
Add semicolons - 10899 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1403 / 3078
  • Number of attempts: 4
Split line with dots - 2154 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 16
  • Position: #179 / 635
  • Number of attempts: 4
remove lines containing the word "reader" - 3614 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #763 / 1173
  • Number of attempts: 1
Box it - 7954 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 27
  • Position: #1182 / 1886
  • Number of attempts: 2
Search and Replace 0 - 5007 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #795 / 1631
  • Number of attempts: 7
That hyphen - 2595 entries

"vim vi improved"

  • Best score: 9
  • Best player score: 10
  • Position: #273 / 701
  • Number of attempts: 7
Just the middle - 11509 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1874 / 4218
  • Number of attempts: 4
Line under headers - 2072 entries

Put a line under each header, and remove the other markdown formatting.

  • Best score: 24
  • Best player score: 38
  • Position: #427 / 510
  • Number of attempts: 1
I forgot quotes - 16061 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1953 / 4195
  • Number of attempts: 7
NBCU Weekly Challenge - Test - 253 entries

Just testing.

  • Best score: 18
  • Best player score: 20
  • Position: #93 / 116
  • Number of attempts: 2
NBCU Weekly Challenge - #0 - 139 entries

One of our favorites lines here at NBCU! p.s. The first version of #0 was deleted due to me copy/pasting a HTML entity. Congrats to the one who figured that out, you are a true ninja warrior!

  • Best score: 30
  • Best player score: 33
  • Position: #34 / 58
  • Number of attempts: 3
Comparing scores - 112 entries

If Alice and Bob both did the challenge, put their entries together in the top paragraph, so we can compare their scores more easily.

  • Best score: 18
  • Best player score: 67
  • Position: #35 / 35
  • Number of attempts: 2
Don't know what this is - 2024 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: 14
  • Position: #297 / 586
  • Number of attempts: 3
A HAPPY NEW YEAR 2014 ! - 10699 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 12
  • Position: #1883 / 3695
  • Number of attempts: 2
quotes inside quotes - 3182 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: 15
  • Position: #503 / 1085
  • Number of attempts: 4
Words in parens - 12975 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1259 / 3971
  • Number of attempts: 2
Delete unwanted lines - 431 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 9
  • Position: #95 / 234
  • Number of attempts: 2
Minimalist Limerick - 520 entries

Reproduce this lovely poem.

  • Best score: 30
  • Best player score: 48
  • Position: #160 / 174
  • Number of attempts: 2
Prefixes and suffixes - 637 entries

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

  • Best score: 17
  • Best player score: 27
  • Position: #109 / 202
  • Number of attempts: 7
lamb had a little Mary - 637 entries

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

  • Best score: 16
  • Best player score: 38
  • Position: #121 / 174
  • Number of attempts: 1
Saving the hashes(#) - 2063 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: 27
  • Position: #240 / 480
  • Number of attempts: 5
Let's play some Ivmgolf - 1130 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #216 / 448
  • Number of attempts: 4
replacing each line of a block selection - 3005 entries

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

  • Best score: 18
  • Best player score: 21
  • Position: #366 / 779
  • Number of attempts: 1
Switch function arguments - 2162 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #386 / 669
  • Number of attempts: 3
Append semicolon after expressions - 1057 entries

Some lines need the semicolon, some don't.

  • Best score: 11
  • Best player score: 11
  • Position: #58 / 420
  • Number of attempts: 2
switch variable - 5085 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 12
  • Position: #773 / 1750
  • Number of attempts: 3
Make it more readable - 2009 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Position: #384 / 652
  • Number of attempts: 1
Numbering a List - 1939 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 19
  • Position: #250 / 655
  • Number of attempts: 3
Sort and add attributes - 1507 entries

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

  • Best score: 33
  • Best player score: 34
  • Position: #362 / 584
  • Number of attempts: 4
Simple text editing with Vim - 13134 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1862 / 3776
  • Number of attempts: 7
Fnord Everywhere
Twitter:

Sysadmin with strong emphasis on CI/CD and attemting to live the Devops Culture

entered into 36 challenges

contributed 0 challenges