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 - 32953 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: #2655 / 7275
  • Number of attempts: 6
One number per line - 18395 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 16
  • Position: #973 / 3793
  • Number of attempts: 7
Swap values inside brackets - 2433 entries

Easy challenge.

  • Best score: 14
  • Best player score: 16
  • Position: #253 / 561
  • Number of attempts: 4
Add semicolons - 10545 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1164 / 2989
  • Number of attempts: 4
Bad Copy Syntax - 1938 entries

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

  • Best score: 18
  • Best player score: 20
  • Position: #234 / 493
  • Number of attempts: 1
remove lines containing the word "reader" - 3454 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #692 / 1121
  • Number of attempts: 1
Box it - 7682 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 22
  • Position: #509 / 1836
  • Number of attempts: 4
multiple cursor alternative - 1447 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: #176 / 369
  • Number of attempts: 5
Copy three lines - 2801 entries

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

  • Best score: 13
  • Best player score: 18
  • Position: #339 / 625
  • Number of attempts: 2
Search and Replace 0 - 4676 entries

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

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

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 9
  • Position: #3541 / 4114
  • Number of attempts: 1
Team names - 1777 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 17
  • Position: #304 / 570
  • Number of attempts: 2
Vice versa - 7535 entries

Little role switching.

  • Best score: 12
  • Best player score: 16
  • Position: #1362 / 2048
  • Number of attempts: 1
One to Ten - 2095 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 / 642
  • Number of attempts: 3
Line under headers - 1918 entries

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

  • Best score: 24
  • Best player score: 26
  • Position: #52 / 472
  • Number of attempts: 3
Collect List - 4184 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 18
  • Position: #1063 / 1167
  • Number of attempts: 1
I forgot quotes - 15748 entries

Oops.

  • Best score: 10
  • Best player score: 15
  • Position: #2297 / 4116
  • Number of attempts: 1
-a-b-c- - 3118 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #1007 / 1112
  • Number of attempts: 1
A HAPPY NEW YEAR 2014 ! - 10538 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 13
  • Position: #2570 / 3638
  • Number of attempts: 1
quotes inside quotes - 3030 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: #480 / 1045
  • Number of attempts: 2
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1752 / 3919
  • Number of attempts: 3
Vertical Limit - 2370 entries

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

  • Best score: 21
  • Best player score: 26
  • Position: #472 / 718
  • Number of attempts: 1
Switch function arguments - 1982 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 13
  • Position: #402 / 627
  • Number of attempts: 1
Simple text editing with Vim - 11657 entries

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

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

College student/Japanese/

entered into 24 challenges

contributed 0 challenges