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

Swap values - 4543 entries

Well, swap the values...

  • Best score: 11
  • Best player score: 13
  • Position: #541 / 1257
  • Number of attempts: 3
One number per line - 18616 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 52
  • Position: #3801 / 3842
  • Number of attempts: 1
Swap values inside brackets - 2464 entries

Easy challenge.

  • Best score: 14
  • Best player score: 15
  • Position: #186 / 569
  • Number of attempts: 9
Applying same text modification in several lines - 2845 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #315 / 840
  • Number of attempts: 3
Add semicolons - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #764 / 3044
  • Number of attempts: 3
Split line with dots - 2125 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 21
  • Position: #387 / 630
  • Number of attempts: 1
remove lines containing the word "reader" - 3537 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #545 / 1144
  • Number of attempts: 1
Box it - 7828 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Position: #557 / 1865
  • Number of attempts: 4
comment and uncomment code inline - 1069 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: 10
  • Position: #163 / 314
  • Number of attempts: 2
Extract HTML option values from tag values - 98 entries

Generate HTML option values from the text in the option tag. If the text contains multiple words, replace the spaces with an underscore and convert all capital letters to small letters.

  • Best score: 34
  • Best player score: 38
  • Position: #32 / 42
  • Number of attempts: 2
For all cases. - 141 entries

In this case... change it! :) Watch the line.

  • Best score: 8
  • Best player score: 8
  • Position: #9 / 100
  • Number of attempts: 1
Simple addition - 310 entries

The right side of the equation is already there. We just need the left one now.

  • Best score: 12
  • Best player score: 15
  • Position: #94 / 117
  • Number of attempts: 1
create arrows in a list - 106 entries

Add arrow at same distance

  • Best score: 10
  • Best player score: 10
  • Position: #6 / 71
  • Number of attempts: 1
Nesting SASS - 261 entries

Move a block inside another block and indent it

  • Best score: 9
  • Best player score: 17
  • Position: #74 / 93
  • Number of attempts: 1
Combines all items - 303 entries

For each line that starts with the same number I want to combine its contents

  • Best score: 9
  • Best player score: 10
  • Position: #117 / 137
  • Number of attempts: 1
ninja substitution - 1372 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 21
  • Position: #206 / 261
  • Number of attempts: 1
One to Ten - 2165 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: 14
  • Position: #403 / 662
  • Number of attempts: 3
Delete to the end of the current line - 791 entries

Delete to the end of the current line, but keep the character under the cursor.

  • Best score: 5
  • Best player score: 5
  • Position: #63 / 385
  • Number of attempts: 2
change parenthesis - 278 entries

change the pair of braces into a pair of parentheses

  • Best score: 9
  • Best player score: 10
  • Position: #93 / 156
  • Number of attempts: 1
Remove quotes after first field - 353 entries

Remove the quotes around each field except for the first field.

  • Best score: 16
  • Best player score: 26
  • Position: #68 / 87
  • Number of attempts: 1
Array transposition - 2378 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 21
  • Position: #231 / 443
  • Number of attempts: 4
I forgot quotes - 15931 entries

Oops.

  • Best score: 10
  • Best player score: 11
  • Position: #1170 / 4161
  • Number of attempts: 12
A HAPPY NEW YEAR 2014 ! - 10624 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #1135 / 3666
  • Number of attempts: 3

Contributed Challenges

Replace and keep the case - 407 entries

Replace all instance of plugin and Plugin to device and Device.

Split line with dots - 2125 entries

This line is too long, split it.

Benoit Benoit
Twitter:

Dev backend. RSpec core team. #Ruby #Rails #Lambda #PostreSQL. Emoji consultant. Vim fan. | he / him 🏴

entered into 23 challenges

contributed 2 challenges