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

Put a newline after every 10 lines in vim - 1660 entries

Goal is to put a newline after every 10 lines in vim.

  • Best score: 10
  • Best player score: 13
  • Position: #294 / 558
  • Number of attempts: 2
Turn the x - 328 entries

Turn the x to a +

  • Best score: 19
  • Best player score: 21
  • Position: #43 / 82
  • Number of attempts: 11
Rural Post - 4531 entries

Simple challenge to remove all but the post code on each line

  • Best score: 9
  • Best player score: 14
  • Position: #727 / 1107
  • Number of attempts: 4
Add quotes to ansible playbook - 1001 entries

You created an ansible playbook, but forgot to add quotes. Can you fix it?

  • Best score: 8
  • Best player score: 9
  • Position: #180 / 316
  • Number of attempts: 2
Multiline to Single Line - 731 entries

Convert a multiline, indented file to a single line with no whitespace

  • Best score: 5
  • Best player score: 5
  • Position: #173 / 310
  • Number of attempts: 2
Yo To Hello - 1142 entries

Simply Turn Yo To Hello

  • Best score: 8
  • Best player score: 12
  • Position: #487 / 529
  • Number of attempts: 3
Replace pattern with 1, 2, 3, ... on each line - 1150 entries

For each line replace a search pattern (in this case $) with numbers starting at 1 and then increasing by 1 for each replaced match. a$b$c$ -> a0b1c2

  • Best score: 21
  • Best player score: 58
  • Position: #223 / 232
  • Number of attempts: 2
Simple, Practical, and Common - 33724 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: 30
  • Position: #5273 / 7442
  • Number of attempts: 1
One number per line - 18755 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2231 / 3870
  • Number of attempts: 2
V to the i - 4813 entries

Input is 99 V's. Output is 100 i's.

  • Best score: 7
  • Best player score: 8
  • Position: #1377 / 1897
  • Number of attempts: 3
Applying same text modification in several lines - 2897 entries

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

  • Best score: 12
  • Best player score: 14
  • Position: #386 / 857
  • Number of attempts: 3
Add semicolons - 10881 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #814 / 3072
  • Number of attempts: 6
remove lines containing the word "reader" - 3604 entries

easy stuff

  • Best score: 9
  • Best player score: 14
  • Position: #1038 / 1169
  • Number of attempts: 1
Com(m)a Trouble - 3875 entries

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

  • Best score: 12
  • Best player score: 13
  • Position: #261 / 876
  • Number of attempts: 2
Box it - 7916 entries

Create a box around a line.

  • Best score: 21
  • Best player score: 26
  • Position: #1063 / 1881
  • Number of attempts: 5
Search and Replace 0 - 5004 entries

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

  • Best score: 12
  • Best player score: 12
  • Position: #582 / 1630
  • Number of attempts: 4
Just the middle - 11484 entries

Delete the instructions at the top and bottom.

  • Best score: 7
  • Best player score: 8
  • Position: #2852 / 4209
  • Number of attempts: 4
Team names - 1841 entries

The team names are misspelled.

  • Best score: 16
  • Best player score: 21
  • Position: #518 / 589
  • Number of attempts: 1
Remember VimGolf Rules ! - 264 entries

Rules, ... and don't forget !

  • Best score: 7
  • Best player score: 8
  • Position: #107 / 142
  • Number of attempts: 2
Join 'em - 251 entries

This shouldn't be too tough

  • Best score: 4
  • Best player score: 5
  • Position: #31 / 151
  • Number of attempts: 4
VimGolfNight - 566 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #266 / 348
  • Number of attempts: 2
Happy TvvO - 427 entries

Don’t forget the past, learn from it. Happy New Year.

  • Best score: 12
  • Best player score: 12
  • Position: #146 / 206
  • Number of attempts: 1
I forgot quotes - 16022 entries

Oops.

  • Best score: 10
  • Best player score: 10
  • Position: #875 / 4189
  • Number of attempts: 3
learn vim in short time - 240 entries

so happy to learn vim.because vim is awesome

  • Best score: 8
  • Best player score: 8
  • Position: #120 / 161
  • Number of attempts: 2
-a-b-c- - 3216 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 17
  • Position: #1038 / 1138
  • Number of attempts: 1
Gray area - 747 entries

It's a golf metaphor or something.

  • Best score: 11
  • Best player score: 14
  • Position: #235 / 271
  • Number of attempts: 2
quotes inside quotes - 3165 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: #316 / 1079
  • Number of attempts: 4
The name of the game - 671 entries

End up with the name of the game.

  • Best score: 11
  • Best player score: 11
  • Position: #247 / 362
  • Number of attempts: 1
lamb had a little Mary - 618 entries

"Mary" and "lamb" are swapped. Unswap them. Fast as you can.

  • Best score: 16
  • Best player score: 32
  • Position: #67 / 169
  • Number of attempts: 10
Let's play some Ivmgolf - 1122 entries

Oops, I spelled that wrong.

  • Best score: 7
  • Best player score: 9
  • Position: #316 / 446
  • Number of attempts: 3
Remove noise from HTTP log - 717 entries

This piece of log (from the year 2000) contains some irrelevant data. We only want to see the HTTP method and resource.

  • Best score: 15
  • Best player score: 15
  • Position: #126 / 273
  • Number of attempts: 1
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 13
  • Position: #1230 / 1749
  • Number of attempts: 2
A Simple One - 1057 entries

Here is a very simple one - just to illustrate/introduce a vim feature that some people seem to miss...

  • Best score: 9
  • Best player score: 9
  • Position: #494 / 667
  • Number of attempts: 2
Reverse Simple Deletion - 854 entries

You did the simple deletion, now reverse it.

  • Best score: 11
  • Best player score: 12
  • Position: #344 / 460
  • Number of attempts: 2
The Cake is a Lie - 1361 entries

Correct the capitalization of each word

  • Best score: 9
  • Best player score: 10
  • Position: #386 / 531
  • Number of attempts: 2
Make Fancy Header - 1063 entries

Make the header text stand out with surrounding asterisks

  • Best score: 15
  • Best player score: 17
  • Position: #205 / 346
  • Number of attempts: 3
Graeme Smith
Twitter:

entered into 36 challenges

contributed 0 challenges