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

Inverting Lines - 1961 entries

A simple challenge to invert all lines, except the first.

  • Best score: 10
  • Best player score: 10
  • Position: #125 / 526
  • Number of attempts: 5
Modernise code - 1439 entries

Modernise and clean up some C++ code.

  • Best score: 34
  • Best player score: 34
  • Position: #47 / 333
  • Number of attempts: 8
Python: Def to Lambda - 492 entries

LAMBDA!!!

  • Best score: 19
  • Best player score: 19
  • Position: #66 / 162
  • Number of attempts: 2
Add quotes to ansible playbook - 1049 entries

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

  • Best score: 8
  • Best player score: 8
  • Position: #78 / 332
  • Number of attempts: 3
xrandr outputs and dashes - 753 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: #126 / 229
  • Number of attempts: 1
Yo To Hello - 1156 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 10
  • Position: #349 / 537
  • Number of attempts: 2
Get mail address from outlook format - 660 entries

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

  • Best score: 15
  • Best player score: 15
  • Position: #72 / 207
  • Number of attempts: 4
prepend * to every non-blank line - 6395 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #418 / 1562
  • Number of attempts: 5
One number per line - 18903 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #741 / 3904
  • Number of attempts: 7
V to the i - 4883 entries

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

  • Best score: 7
  • Best player score: 7
  • Position: #776 / 1914
  • Number of attempts: 2
Applying same text modification in several lines - 2931 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #10 / 867
  • Number of attempts: 3
Add semicolons - 10956 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #731 / 3098
  • Number of attempts: 3
remove lines containing the word "reader" - 3652 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #483 / 1185
  • Number of attempts: 1
Every other line - 2951 entries

AaAaAaA

  • Best score: 12
  • Best player score: 20
  • Position: #629 / 712
  • Number of attempts: 1
comment and uncomment code inline - 1182 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: 9
  • Position: #147 / 332
  • Number of attempts: 3
Just the middle - 11616 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #1476 / 4255
  • Number of attempts: 2
Vice versa - 8019 entries

Little role switching.

  • Best score: 12
  • Best player score: 12
  • Position: #594 / 2157
  • Number of attempts: 5
One to Ten - 2258 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: 12
  • Position: #341 / 688
  • Number of attempts: 1
Line under headers - 2095 entries

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

  • Best score: 24
  • Best player score: 27
  • Position: #201 / 515
  • Number of attempts: 7
quotes inside quotes - 3202 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: 14
  • Position: #347 / 1093
  • Number of attempts: 4
Max
Twitter:

entered into 20 challenges

contributed 0 challenges