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 - 32910 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: #2608 / 7271
  • Number of attempts: 3
One number per line - 18378 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 14
  • Position: #524 / 3788
  • Number of attempts: 9
Add semicolons - 10541 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 10
  • Position: #11 / 2989
  • Number of attempts: 3
remove lines containing the word "reader" - 3454 entries

easy stuff

  • Best score: 9
  • Best player score: 9
  • Position: #211 / 1121
  • Number of attempts: 3
Com(m)a Trouble - 3379 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #37 / 761
  • Number of attempts: 11
Box it - 7682 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 23
  • Position: #626 / 1836
  • Number of attempts: 5
Just the middle - 11140 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 7
  • Position: #1242 / 4113
  • Number of attempts: 3
Combines all items - 269 entries

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

  • Best score: 9
  • Best player score: 9
  • Position: #70 / 123
  • Number of attempts: 2
Fun With The Diagonal - 97 entries

change the lowercase characters on the main diagonal to uppercase

  • Best score: 11
  • Best player score: 11
  • Position: #65 / 74
  • Number of attempts: 1
Sorting a glossary - 115 entries

Sort a glossary. Glossary head contains a header phrase ending with ':' and glossary body has multi line text indented with a tab.

  • Best score: 6
  • Best player score: 6
  • Position: #62 / 74
  • 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: #122 / 642
  • Number of attempts: 4
Reorder the groups - 1112 entries

Change the order so that the groups of fruit come before the vegetables.

  • Best score: 14
  • Best player score: 14
  • Position: #3 / 252
  • Number of attempts: 4
Mute the second method of this script - 439 entries

prepend a # infront of every line of the second method

  • Best score: 9
  • Best player score: 9
  • Position: #131 / 233
  • Number of attempts: 2
Don't know what this is - 1951 entries

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

  • Best score: 11
  • Best player score: 11
  • Position: #113 / 572
  • Number of attempts: 6
Counting in binary - 412 entries

"a" represents 0; "A" represents 1. Start from zero and count to 15.

  • Best score: 16
  • Best player score: 16
  • Position: #12 / 108
  • Number of attempts: 29
quotes inside quotes - 3026 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: #314 / 1044
  • Number of attempts: 4
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #981 / 3919
  • Number of attempts: 3
Delete unwanted lines - 358 entries

Delete all lines which does not end in "o.."

  • Best score: 9
  • Best player score: 9
  • Position: #174 / 215
  • Number of attempts: 2
Python: Lots of function arguments - 81 entries

The function definition is too long for one line. The modeline helps you with some typical Python indent settings.

  • Best score: 13
  • Best player score: 13
  • Position: #16 / 40
  • Number of attempts: 7
SFD-ROC: vimvimvim - 1508 entries

Oh no, this line is longer than 80 chars... put each 'vim' on a new line.

  • Best score: 8
  • Best player score: 8
  • Position: #101 / 424
  • Number of attempts: 7
Make it more readable - 1891 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 13
  • Position: #96 / 622
  • Number of attempts: 5
Ben M
Twitter:

entered into 21 challenges

contributed 0 challenges