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

Yo To Hello - 1129 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #74 / 523
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1146 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: 27
  • Position: #102 / 229
  • Number of attempts: 1
Simple, Practical, and Common - 33584 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: #2752 / 7407
  • Number of attempts: 4
Get mail address from outlook format - 647 entries

Create a mail list space separated of mail list formatted by outlook

  • Best score: 15
  • Best player score: 16
  • Position: #104 / 203
  • Number of attempts: 3
prepend * to every non-blank line - 6298 entries

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

  • Best score: 10
  • Best player score: 10
  • Position: #174 / 1535
  • Number of attempts: 3
One number per line - 18710 entries

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1307 / 3857
  • Number of attempts: 3
V to the i - 4798 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1447 / 1891
  • Number of attempts: 1
Add semicolons - 10846 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1443 / 3060
  • Number of attempts: 1
html paragraph to table - 606 entries

reformat html paragraph to table

  • Best score: 48
  • Best player score: 52
  • Position: #37 / 126
  • Number of attempts: 3
Two pairs of cluster of letters creates word - 749 entries

Clean and group.

  • Best score: 17
  • Best player score: 21
  • Position: #122 / 178
  • Number of attempts: 2
Copy three lines - 2872 entries

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

  • Best score: 13
  • Best player score: 18
  • Position: #351 / 640
  • Number of attempts: 3
ninja substitution - 1420 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 15
  • Position: #123 / 267
  • Number of attempts: 3
Vice versa - 7903 entries

Little role switching.

  • Best score: 12
  • Best player score: 15
  • Position: #1112 / 2125
  • Number of attempts: 3
Free hyphen! - 169 entries

Just like "Inner hyphens", but I'm giving you a free hyphen to play with. Will your solution be any different?

  • Best score: 9
  • Best player score: 11
  • Position: #79 / 89
  • Number of attempts: 2
Put the months in order - 974 entries

Our contractor thought that months should be in alphabetical order. Put them in calendar order please.

  • Best score: 20
  • Best player score: 45
  • Position: #100 / 163
  • Number of attempts: 2
Array transposition - 2415 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Position: #161 / 446
  • Number of attempts: 9
Collect List - 4298 entries

Convert to comma separated list.

  • Best score: 12
  • Best player score: 12
  • Position: #481 / 1190
  • Number of attempts: 2
I forgot quotes - 15973 entries

Oops.

  • Best score: 10
  • Best player score: 13
  • Position: #1421 / 4175
  • Number of attempts: 3
Shift down - 209 entries

Number words are back.

  • Best score: 19
  • Best player score: 26
  • Position: #34 / 69
  • Number of attempts: 1
-a-b-c- - 3213 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 14
  • Position: #406 / 1137
  • Number of attempts: 2
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: #113 / 137
  • Number of attempts: 1
Words in parens - 12928 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1820 / 3960
  • Number of attempts: 2
Word frequency alignment - 290 entries

You've got to align the second column, but the spacing is inconvenient and there are nasty tabs in the way. If you're a "real Vim ninja," this could be very quick indeed...

  • Best score: 5
  • Best player score: 5
  • Position: #105 / 161
  • Number of attempts: 4
abcd > a b c d - 290 entries

transform the single spaces into 4 spaces repeat for each line

  • Best score: 15
  • Best player score: 15
  • Position: #181 / 221
  • Number of attempts: 1
Alphabet soup - 429 entries

Create a column of all alphabet characters organized in a funky way

  • Best score: 25
  • Best player score: 39
  • Position: #78 / 108
  • Number of attempts: 2
switch variable - 5067 entries

how fast can you switch two variable ?

  • Best score: 11
  • Best player score: 11
  • Position: #611 / 1746
  • Number of attempts: 1
Sort the cardinal numbers - 310 entries

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 12
  • Position: #48 / 148
  • Number of attempts: 4
Overall Vimgolf Rank - 216 entries

Suppose you are trying to figure out what your overall rank is at Vimgolf(the sum of all the ranks you got), and as a Vim ninja you decided to use Vim to do the job. Your solution should work for every Vimgolf profile page(The actual input file for this challenge is my Vimgolf profile page). So, direct answer insertion is considered cheating.

  • Best score: 21
  • Best player score: 43
  • Position: #48 / 59
  • Number of attempts: 2
82 bottles of beer on the wall - 310 entries

Take them down. (sorry, only 82 bottles because the problem size is limited!)

  • Best score: 106
  • Best player score: 110
  • Position: #16 / 144
  • Number of attempts: 7
Bob Streams
Twitter:

entered into 29 challenges

contributed 0 challenges