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

Find fix point of cos - 1116 entries

Write a function to find the fix point of cos. It is not a good code; It is just to use vim. Inspired by the excellent https://mvanier.livejournal.com/2897.html about the Y combinator.

  • Best score: 14
  • Best player score: 15
  • Position: #118 / 334
  • Number of attempts: 4
Insert column data on Confluence-style table - 425 entries

Add ip addresses into new "IP" column based on the last digits from the "Server" column

  • Best score: 33
  • Best player score: 103
  • Position: #90 / 99
  • Number of attempts: 2
Paste a column after a column - 2243 entries

This task is very common while using multi-cursor. What is the elegant vim way ?

  • Best score: 14
  • Best player score: 16
  • Position: #155 / 487
  • Number of attempts: 12
Many duplicates - 1251 entries

Quick and easy

  • Best score: 7
  • Best player score: 8
  • Position: #238 / 410
  • Number of attempts: 5
HS Final exam vimgolf - 864 entries

Change the initial file to a single line containing all names comma-separated with numbers inside parentheses.

  • Best score: 21
  • Best player score: 34
  • Position: #155 / 227
  • Number of attempts: 5
Easy modification of ssh config - 335 entries

Just add another alias to each worker

  • Best score: 24
  • Best player score: 24
  • Position: #8 / 104
  • Number of attempts: 6
Python: Def to Lambda - 423 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #7 / 149
  • Number of attempts: 3
Format the CSS - 115 entries

You just copied some CSS color names from the web and need to add them to your python module. Create the COLORS variable and assign a dict() with the names as keys and hex-colors as values. BEWARE OF THE TABS!!

  • Best score: 41
  • Best player score: 47
  • Position: #27 / 43
  • Number of attempts: 6
Rural Post - 4360 entries

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

  • Best score: 9
  • Best player score: 10
  • Position: #217 / 1070
  • Number of attempts: 8
Satisfy the go linter - 2328 entries

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

  • Best score: 20
  • Best player score: 20
  • Position: #23 / 456
  • Number of attempts: 14
Add quotes to ansible playbook - 926 entries

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

  • Best score: 8
  • Best player score: 8
  • Position: #9 / 295
  • Number of attempts: 5
xrandr outputs and dashes - 652 entries

uh oh, different video drivers identify display outputs with more dashes. Quick, need to change this xrandr script!

  • Best score: 12
  • Best player score: 12
  • Position: #68 / 213
  • Number of attempts: 6
Simple, Practical, and Common - 33379 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: #1119 / 7363
  • Number of attempts: 19
Get mail address from outlook format - 621 entries

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

  • Best score: 15
  • Best player score: 15
  • Position: #57 / 196
  • Number of attempts: 6
prepend * to every non-blank line - 6208 entries

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

  • Best score: 10
  • Best player score: 20
  • Position: #1261 / 1517
  • Number of attempts: 1
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 16
  • Position: #1017 / 3842
  • Number of attempts: 19
V to the i - 4751 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #758 / 1879
  • Number of attempts: 4
Add semicolons - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #667 / 3044
  • Number of attempts: 14
remove lines containing the word "reader" - 3537 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #423 / 1144
  • Number of attempts: 3
multiple cursor alternative - 1474 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: 21
  • Position: #208 / 376
  • Number of attempts: 9
Copy three lines - 2840 entries

If the site is up (by some miracle), make the text under every header identical.

  • Best score: 13
  • Best player score: 15
  • Position: #245 / 635
  • Number of attempts: 12
Just the middle - 11358 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #999 / 4163
  • Number of attempts: 10
Vice versa - 7797 entries

Little role switching.

  • Best score: 12
  • Best player score: 17
  • Position: #1584 / 2099
  • Number of attempts: 3
Array transposition - 2378 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 25
  • Position: #293 / 443
  • Number of attempts: 10
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2351 / 4161
  • Number of attempts: 7
A HAPPY NEW YEAR 2014 ! - 10624 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 14
  • Position: #2792 / 3666
  • Number of attempts: 2
Words in parens - 12854 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #826 / 3945
  • Number of attempts: 11
switch variable - 5031 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 28
  • Position: #1704 / 1735
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 6557 entries

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

  • Best score: 32
  • Best player score: 47
  • Position: #1228 / 1614
  • Number of attempts: 1
MathijsHoogland
Twitter:

entered into 29 challenges

contributed 0 challenges