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 - 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: 22
  • Position: #30 / 7442
  • Number of attempts: 6
prepend * to every non-blank line - 6337 entries

Prepend an asterisk to every non-blank line in the input file.

  • Best score: 10
  • Best player score: 11
  • Position: #614 / 1546
  • Number of attempts: 3
One number per line - 18755 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 20
  • Position: #2140 / 3870
  • Number of attempts: 3
Add semicolons - 10881 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 12
  • Position: #1910 / 3072
  • Number of attempts: 1
Split line with dots - 2154 entries

This line is too long, split it.

  • Best score: 15
  • Best player score: 16
  • Position: #175 / 635
  • Number of attempts: 3
remove lines containing the word "reader" - 3604 entries

easy stuff

  • Best score: 9
  • Best player score: 10
  • Position: #517 / 1169
  • Number of attempts: 1
Just the middle - 11484 entries

Delete the instructions at the top and bottom.

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

The team names are misspelled.

  • Best score: 16
  • Best player score: 16
  • Position: #50 / 589
  • Number of attempts: 3
Make HTML List - 1061 entries

Turn the comma separated list into an unordered html list.

  • Best score: 33
  • Best player score: 48
  • Position: #158 / 274
  • Number of attempts: 1
Vice versa - 7945 entries

Little role switching.

  • Best score: 12
  • Best player score: 14
  • Position: #864 / 2138
  • Number of attempts: 2
Lower cased and dashed strings - 49 entries

As I have to generate big fixtures files, I wanted to find a way to format input data the way described by start and end files. Especially the lower-cased-and-dashed ids Not so good to find a pure Vim way, that's why I submit this challenge ;)

  • Best score: 59
  • Best player score: 93
  • Position: #15 / 20
  • Number of attempts: 1
Vim's not included features - 240 entries

Filter not included (-) features in a hypothetical installation of vim.

  • Best score: 23
  • Best player score: 33
  • Position: #43 / 65
  • Number of attempts: 2
Mirror Symmetry - 822 entries

Add backslashes.

  • Best score: 7
  • Best player score: 12
  • Position: #142 / 269
  • Number of attempts: 2
Collect List - 4305 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #51 / 1191
  • Number of attempts: 4
VimGolfNight - 566 entries

Based on "The name of the game".

  • Best score: 12
  • Best player score: 12
  • Position: #172 / 348
  • Number of attempts: 1
remove all lines in first part - 211 entries

From the second part, remove all lines in the first part. It can be useful when you have done something from a long list, you want to know what is not done yet!

  • Best score: 13
  • Best player score: 21
  • Position: #52 / 67
  • Number of attempts: 2
I forgot quotes - 16022 entries

Oops.

  • Best score: 10
  • Best player score: 14
  • Position: #1453 / 4189
  • Number of attempts: 2
Count both ways - 1022 entries

Right AND down.

  • Best score: 13
  • Best player score: 16
  • Position: #163 / 354
  • Number of attempts: 1
Change name of a variable - 179 entries

Replace the name of the $variable with the fastest move possible. The challenge is having a command that allow you to easily change the variable name even if its indented.

  • Best score: 9
  • Best player score: 9
  • Position: #82 / 137
  • Number of attempts: 1
Two become one - 713 entries

We have two c arrays and want to make one two dimensional out of it. Can we do that?

  • Best score: 25
  • Best player score: 34
  • Position: #132 / 208
  • Number of attempts: 2
Mess in revision history - 1184 entries

Help Joe clean up what Steve has cobbled.

  • Best score: 17
  • Best player score: 18
  • Position: #79 / 250
  • Number of attempts: 7
A HAPPY NEW YEAR 2014 ! - 10682 entries

A HAPPY NEW YEAR 2014 !

  • Best score: 11
  • Best player score: 11
  • Position: #48 / 3689
  • Number of attempts: 6
attr_aligner - 3522 entries

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

  • Best score: 19
  • Best player score: 34
  • Position: #550 / 703
  • Number of attempts: 4
Counting in binary - 526 entries

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

  • Best score: 16
  • Best player score: 48
  • Position: #100 / 117
  • Number of attempts: 2
Letter case trickery - 1630 entries

This file is in a downright esoteric format, consisting of hexadecimal numbers, non-hexadecimal keywords, and "Z" indicating end-of-line. Make the hexadecimal numbers lowercase.

  • Best score: 9
  • Best player score: 10
  • Position: #82 / 518
  • Number of attempts: 9
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: #93 / 1079
  • Number of attempts: 5
Words in parens - 12967 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 14
  • Position: #67 / 3969
  • Number of attempts: 6
Switch function arguments - 2140 entries

How to switch two arguments of a function.

  • Best score: 11
  • Best player score: 12
  • Position: #254 / 664
  • Number of attempts: 4
switch variable - 5079 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #239 / 1749
  • Number of attempts: 6
Make it more readable - 2009 entries

Insert blank lines to make it more organized and readable

  • Best score: 13
  • Best player score: 16
  • Position: #345 / 652
  • Number of attempts: 2
Generate English Alphabets - 487 entries

Start with a, get up to z.

  • Best score: 19
  • Best player score: 24
  • Position: #62 / 206
  • Number of attempts: 4
Numbering a List - 1935 entries

Pretty simple, number the list.

  • Best score: 13
  • Best player score: 20
  • Position: #327 / 654
  • Number of attempts: 3
Increment, increment, increment.... - 692 entries

Vim likes macros

  • Best score: 10
  • Best player score: 12
  • Position: #204 / 410
  • Number of attempts: 2
Reformat some Python - 622 entries

Fix some very bizarrely laid-out code.

  • Best score: 34
  • Best player score: 46
  • Position: #153 / 238
  • Number of attempts: 1
Change the content of a string - 1593 entries

This docstring is a complete lie. Fix it.

  • Best score: 22
  • Best player score: 32
  • Position: #557 / 594
  • Number of attempts: 1
Sort and add attributes - 1477 entries

Sort the states and add the attribute country to each record.

  • Best score: 33
  • Best player score: 47
  • Position: #564 / 575
  • Number of attempts: 1
Simple text editing with Vim - 12989 entries

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

  • Best score: 13
  • Best player score: 14
  • Position: #1082 / 3737
  • Number of attempts: 6
Rasmus P
Twitter:

entered into 37 challenges

contributed 0 challenges