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 - 33616 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: 22
  • Position: #4 / 7420
  • Number of attempts: 4
Swap values - 4616 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 14
  • Position: #662 / 1268
  • Number of attempts: 1
One number per line - 18727 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1584 / 3864
  • Number of attempts: 2
V to the i - 4802 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #183 / 1893
  • Number of attempts: 3
Split line with dots - 2144 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 15
  • Position: #4 / 634
  • Number of attempts: 4
Extract argument from function - 2357 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #342 / 753
  • Number of attempts: 6
Just the middle - 11454 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #1739 / 4197
  • Number of attempts: 3
Make HTML List - 1050 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 54
  • Position: #240 / 273
  • Number of attempts: 1
Missing Library and a Typo - 887 entries

I forgot to add a c library, please add it for me. Also I'm bad at typing so fix my typo too.

  • Best score: 14
  • Best player score: 19
  • Position: #137 / 213
  • Number of attempts: 1
Create a table - 332 entries

Convert the given input into a formatted table

  • Best score: 16
  • Best player score: 20
  • Position: #79 / 105
  • Number of attempts: 2
Wrap text in quotes - 368 entries

All the blocks of text should be wrapped in quotation marks.

  • Best score: 16
  • Best player score: 17
  • Position: #50 / 122
  • Number of attempts: 2
Vice versa - 7907 entries

Little role switching.

  • Best score: 12
  • Best player score: 14
  • Position: #859 / 2128
  • Number of attempts: 2
Pretty multi-line bash - 235 entries

Bash line continuations are much prettier when they're column aligned.

  • Best score: 15
  • Best player score: 31
  • Position: #66 / 77
  • Number of attempts: 1
C Reformatting - 690 entries

You may use Visual mode... or not. #uppercase

  • Best score: 30
  • Best player score: 55
  • Position: #103 / 163
  • Number of attempts: 1
Sorting a glossary - 131 entries

Sort a glossary. Glossary head contains a header phrase ending with ':' and glossary body has multi line text indented with a tab.

  • Best score: 6
  • Best player score: 6
  • Position: #10 / 81
  • Number of attempts: 1
Alsa configuration - 513 entries

I'm tweaking my ~/.asoundrc file!

  • Best score: 22
  • Best player score: 23
  • Position: #54 / 128
  • Number of attempts: 2
Align commas - 1095 entries

There are 15,000 aligning challenges on vimgolf.com, and they're all exactly the same. I hope this one is a little different.

  • Best score: 11
  • Best player score: 17
  • Position: #146 / 246
  • Number of attempts: 1
ascii-art diamond - 44 entries

Simple ascii-art diamond. The grid is 40x40.

  • Best score: 39
  • Best player score: 56
  • Position: #15 / 17
  • Number of attempts: 2
A grid of punctuation - 137 entries

Create a checkerboard of = and - in an 80×24 grid!

  • Best score: 16
  • Best player score: 16
  • Position: #7 / 61
  • Number of attempts: 2
From A to B - 591 entries

Mirror and change this text block

  • Best score: 16
  • Best player score: 21
  • Position: #119 / 159
  • Number of attempts: 2
Collect List - 4298 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #23 / 1190
  • Number of attempts: 2
Rail fence transposition cipher - 84 entries

Solve a rail fence transposition cipher using vim. This ciphertext was created using two rails. Use vim to transpose the text and recover the original quote.

  • Best score: 14
  • Best player score: 28
  • Position: #21 / 26
  • Number of attempts: 1
swap or reverse - 126 entries

Try to swap or reverse the line as needed.

  • Best score: 16
  • Best player score: 16
  • Position: #8 / 69
  • Number of attempts: 1
readability - 327 entries

Make the code readable by adding some spaces

  • Best score: 18
  • Best player score: 18
  • Position: #7 / 152
  • Number of attempts: 1
Interleave lines - 185 entries

This is some kind of « paste -d'\n' c b a ». There are many ways to achieve this.. just find the shortest!

  • Best score: 17
  • Best player score: 34
  • Position: #43 / 60
  • Number of attempts: 3
Logging with key - 328 entries

Sometimes it is better to log with meaningful key

  • Best score: 21
  • Best player score: 33
  • Position: #60 / 88
  • Number of attempts: 1
Space out the alphabet - 1657 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 21
  • Position: #272 / 444
  • Number of attempts: 4
remove all lines in first part - 211 entries

From the second part, remove all lines in the first part. It can be useful when you have done something from a long list, you want to know what is not done yet!

  • Best score: 13
  • Best player score: 15
  • Position: #15 / 67
  • Number of attempts: 3
Fix the XML - 1039 entries

The challenge consists in having a valid xml from an incomplete source.

  • Best score: 18
  • Best player score: 24
  • Position: #113 / 290
  • Number of attempts: 1
Line 'em up! - 421 entries

It can be so hard to keep everything neatly lined-up. Somebody clearly hasn't bothered here. Tidy it up, please!

  • Best score: 17
  • Best player score: 21
  • Position: #70 / 114
  • Number of attempts: 1
Shuffled numbers - 246 entries

Each number is paired with the number it should follow. That's enough information to put them in order.

  • Best score: 15
  • Best player score: 15
  • Position: #10 / 96
  • Number of attempts: 3
Mute the second method of this script - 455 entries

prepend a # infront of every line of the second method

  • Best score: 8
  • Best player score: 9
  • Position: #63 / 239
  • Number of attempts: 3
Remove hard line breaks - 74 entries

Text files with Hard breaks are not good for e-readers. We need remove all hard line breaks and have long lines.

  • Best score: 10
  • Best player score: 14
  • Position: #17 / 34
  • Number of attempts: 3
I forgot quotes - 15983 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1525 / 4180
  • Number of attempts: 5
-a-b-c- - 3213 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 15
  • Position: #546 / 1137
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10663 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #660 / 3683
  • Number of attempts: 3
Words in parens - 12935 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #656 / 3963
  • Number of attempts: 4
Tiny column alignment - 61 entries

Align using the four blocks, don't forget to lowercase and have fun!

  • Best score: 33
  • Best player score: 40
  • Position: #12 / 23
  • Number of attempts: 8
Louis Caruana
Twitter:

USAF vet, astronomy, Libertarian GOP, Linux, & soccer. Desperately hoping for an end of 1 party, 2 names government.

entered into 38 challenges

contributed 0 challenges