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 - 4547 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #346 / 1109
  • Number of attempts: 5
Add quotes to ansible playbook - 1007 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 9
  • Position: #174 / 316
  • Number of attempts: 7
Yo To Hello - 1144 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 13
  • Position: #495 / 530
  • Number of attempts: 1
Simple, Practical, and Common - 33742 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: 31
  • Position: #5710 / 7447
  • Number of attempts: 9
Hogwarts Email Sorting - 928 entries

Given a list of emails, get the students full name and their associated house.

  • Best score: 20
  • Best player score: 28
  • Position: #220 / 262
  • Number of attempts: 2
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: 22
  • Position: #163 / 204
  • Number of attempts: 3
prepend * to every non-blank line - 6353 entries

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

  • Best score: 10
  • Best player score: 11
  • Position: #649 / 1549
  • Number of attempts: 11
One number per line - 18776 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 21
  • Position: #2562 / 3875
  • Number of attempts: 6
V to the i - 4818 entries

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

  • Best score: 7
  • Best player score: 10
  • Position: #1779 / 1898
  • Number of attempts: 4
Applying same text modification in several lines - 2897 entries

Remove identical text at the beginning of several lines and the closing parenthesis.

  • Best score: 12
  • Best player score: 15
  • Position: #545 / 857
  • Number of attempts: 6
Swap the operands under comparison - 297 entries

Swap the operands under comparison to prevent null pointer exception (at least in java)

  • Best score: 19
  • Best player score: 32
  • Position: #90 / 101
  • Number of attempts: 1
Add semicolons - 10887 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1458 / 3074
  • Number of attempts: 17
Split line with dots - 2154 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 28
  • Position: #582 / 635
  • Number of attempts: 1
Com(m)a Trouble - 3880 entries

Someone was real stupid when placing his commas. Can you fix it?

  • Best score: 12
  • Best player score: 31
  • Position: #776 / 878
  • Number of attempts: 1
multiple cursor alternative - 1521 entries

from: https://www.reddit.com/r/vim/comments/6w5pfa/crosspost_from_remacs_how_would_you_do_this_in_vim/

  • Best score: 19
  • Best player score: 28
  • Position: #327 / 381
  • Number of attempts: 1
Array propagate - 338 entries

Complete the array with the keys as part of the value

  • Best score: 23
  • Best player score: 44
  • Position: #111 / 119
  • Number of attempts: 1
Search and Replace 0 - 5007 entries

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

  • Best score: 12
  • Best player score: 16
  • Position: #1234 / 1631
  • Number of attempts: 1
comment and uncomment code inline - 1130 entries

It's very useful to be able to comment out a block of code in a quick edit. And likewise to uncomment the code. This operation often involves multi-line stanzas and even large blocks. With just line-wise navigation and insert mode this would cost you about 4 keystrokes per line. Master this hole of VimGolf and you'll quickly drop your key count in day to day Vim as well.

  • Best score: 9
  • Best player score: 22
  • Position: #313 / 324
  • Number of attempts: 1
Just the middle - 11495 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3582 / 4213
  • Number of attempts: 4
Fiddle percentages into real numbers - 869 entries

Get rid of the '%' symbols and shift the decimal place. This is the easier version - all the columns line up.

  • Best score: 13
  • Best player score: 20
  • Position: #271 / 293
  • Number of attempts: 1
Vice versa - 7953 entries

Little role switching.

  • Best score: 12
  • Best player score: 21
  • Position: #1911 / 2140
  • Number of attempts: 2
comments galore - 1048 entries

Basic comment reformatting

  • Best score: 10
  • Best player score: 22
  • Position: #417 / 425
  • Number of attempts: 1
One to Ten - 2227 entries

Generate the sequence of numbers from 1 to 10, one number per line. Inspired by this Reddit thread: https://redd.it/ak4it2

  • Best score: 12
  • Best player score: 17
  • Position: #556 / 677
  • Number of attempts: 2
convert yml into java pojo field - 857 entries

How fast vim can create fields for java pojo i.e class declaration referring to a (simple) yml file

  • Best score: 29
  • Best player score: 49
  • Position: #222 / 227
  • Number of attempts: 1
Collect List - 4308 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 29
  • Position: #1172 / 1192
  • Number of attempts: 1
Space out the alphabet - 1659 entries

Put 3 spaces between adjacent letters.

  • Best score: 15
  • Best player score: 35
  • Position: #436 / 446
  • Number of attempts: 1
I forgot quotes - 16038 entries

Oops.

  • Best score: 10
  • Best player score: 22
  • Position: #3866 / 4192
  • Number of attempts: 2
-a-b-c- - 3216 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #1010 / 1138
  • Number of attempts: 1
attr_aligner - 3522 entries

Two attr keywords. Two separate indentations. Align the colons.

  • Best score: 19
  • Best player score: 48
  • Position: #671 / 703
  • Number of attempts: 1
Words in parens - 12967 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 17
  • Position: #2752 / 3969
  • Number of attempts: 5
Let's play some Ivmgolf - 1122 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 12
  • Position: #405 / 446
  • Number of attempts: 3
Vertical Limit - 2552 entries

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

  • Best score: 21
  • Best player score: 36
  • Position: #723 / 757
  • Number of attempts: 1
Switch function arguments - 2147 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 26
  • Position: #655 / 666
  • Number of attempts: 2
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 14
  • Position: #1427 / 1749
  • 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: 18
  • Position: #542 / 652
  • Number of attempts: 1
Ruby 1.9 hashes - 1249 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: 17
  • Position: #331 / 407
  • Number of attempts: 1
Whitespace, empty lines and tabs - 3763 entries

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

  • Best score: 16
  • Best player score: 46
  • Position: #770 / 807
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7173 entries

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

  • Best score: 28
  • Best player score: 78
  • Position: #1701 / 1761
  • Number of attempts: 1
Shunichi Kanade
Twitter:

started in dot-coms during bubble years, crash, switched to finance industry, back to software industry because I love it. Java mostly, Ruby is my passion.

entered into 38 challenges

contributed 0 challenges