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 - 33965 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: 23
  • Position: #2726 / 7501
  • Number of attempts: 6
One number per line - 18889 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 16
  • Position: #1004 / 3898
  • Number of attempts: 7
Swap values inside brackets - 2545 entries

Easy challenge.

  • Best score: 13
  • Best player score: 16
  • Position: #267 / 591
  • Number of attempts: 4
Add semicolons - 10932 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1203 / 3091
  • Number of attempts: 4
Bad Copy Syntax - 2078 entries

Copy should be from right to left, but sometimes you type it wrong.

  • Best score: 18
  • Best player score: 20
  • Position: #251 / 540
  • Number of attempts: 1
remove lines containing the word "reader" - 3643 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #722 / 1181
  • Number of attempts: 1
Box it - 7997 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 22
  • Position: #521 / 1897
  • Number of attempts: 4
multiple cursor alternative - 1556 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: 20
  • Position: #182 / 386
  • Number of attempts: 5
Copy three lines - 2909 entries

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

  • Best score: 13
  • Best player score: 18
  • Position: #347 / 644
  • Number of attempts: 2
Search and Replace 0 - 5102 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #628 / 1662
  • Number of attempts: 3
Just the middle - 11572 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3637 / 4240
  • Number of attempts: 1
Team names - 1858 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 17
  • Position: #316 / 594
  • Number of attempts: 2
Vice versa - 7997 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1412 / 2152
  • Number of attempts: 1
One to Ten - 2247 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: #228 / 685
  • Number of attempts: 3
Line under headers - 2093 entries

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

  • Best score: 24
  • Best player score: 26
  • Position: #66 / 514
  • Number of attempts: 3
Collect List - 4332 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 18
  • Position: #1089 / 1196
  • Number of attempts: 1
I forgot quotes - 16176 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2353 / 4216
  • Number of attempts: 1
-a-b-c- - 3233 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #1034 / 1143
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10748 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 13
  • Position: #2629 / 3711
  • Number of attempts: 1
quotes inside quotes - 3195 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: 15
  • Position: #501 / 1089
  • Number of attempts: 2
Words in parens - 13028 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1788 / 3984
  • Number of attempts: 3
Vertical Limit - 2624 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #503 / 774
  • Number of attempts: 1
Switch function arguments - 2195 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #435 / 678
  • Number of attempts: 1
Simple text editing with Vim - 13512 entries

Make the pairs of lines match up by making each second line same as first

  • Best score: 13
  • Best player score: 14
  • Position: #1853 / 3875
  • Number of attempts: 3
hokonch
Twitter:

College student/Japanese/

entered into 24 challenges

contributed 0 challenges