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 - 33757 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: 25
  • Position: #3351 / 7450
  • Number of attempts: 4
One number per line - 18784 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 19
  • Position: #1882 / 3878
  • Number of attempts: 3
Applying same text modification in several lines - 2907 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #147 / 860
  • Number of attempts: 3
Split line with dots - 2154 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 27
  • Position: #577 / 635
  • Number of attempts: 2
remove lines containing the word "reader" - 3614 entries

easy stuff

  • Best score: 9
  • Best player score: 11
  • Position: #899 / 1173
  • Number of attempts: 1
Com(m)a Trouble - 3895 entries

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

  • Best score: 12
  • Best player score: 27
  • Position: #733 / 883
  • Number of attempts: 2
Box it - 7954 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 27
  • Position: #1140 / 1886
  • Number of attempts: 1
multiple cursor alternative - 1542 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: 29
  • Position: #339 / 384
  • Number of attempts: 1
html paragraph to table - 606 entries

reformat html paragraph to table

  • Best score: 48
  • Best player score: 57
  • Position: #60 / 126
  • Number of attempts: 2
Search and Replace 0 - 5007 entries

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

  • Best score: 12
  • Best player score: 15
  • Position: #1134 / 1631
  • Number of attempts: 1
Just the middle - 11500 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2835 / 4216
  • Number of attempts: 2
ninja substitution - 1420 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 23
  • Position: #220 / 267
  • Number of attempts: 2
Vice versa - 7968 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1380 / 2144
  • Number of attempts: 1
One to Ten - 2239 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: 23
  • Position: #617 / 680
  • Number of attempts: 1
No naked if allowed! - 39 entries

House style forbids naked condition statements, comments should start with a space character and be on their own line. Good luck!

  • Best score: 46
  • Best player score: 71
  • Position: #13 / 17
  • Number of attempts: 1
I forgot quotes - 16051 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1855 / 4194
  • Number of attempts: 4
attr_aligner - 3525 entries

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

  • Best score: 19
  • Best player score: 32
  • Position: #501 / 706
  • Number of attempts: 3
Words in parens - 12969 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 16
  • Position: #2479 / 3970
  • Number of attempts: 2
switch variable - 5085 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1230 / 1750
  • Number of attempts: 1
Reformat/Refactor a Golfer Class - 7229 entries

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

  • Best score: 10
  • Best player score: 40
  • Position: #848 / 1778
  • Number of attempts: 1
vimgolfer24271
Twitter:

entered into 20 challenges

contributed 0 challenges