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 - 1051 entries

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #74 / 483
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1037 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: #93 / 209
  • Number of attempts: 1
Simple, Practical, and Common - 32962 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: #2706 / 7276
  • Number of attempts: 4
Get mail address from outlook format - 596 entries

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

  • Best score: 15
  • Best player score: 16
  • Position: #96 / 184
  • Number of attempts: 3
prepend * to every non-blank line - 5977 entries

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

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

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1281 / 3793
  • Number of attempts: 3
V to the i - 4641 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1431 / 1857
  • Number of attempts: 1
Add semicolons - 10545 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1416 / 2989
  • Number of attempts: 1
html paragraph to table - 583 entries

reformat html paragraph to table

  • Best score: 48
  • Best player score: 52
  • Position: #35 / 121
  • Number of attempts: 3
Two pairs of cluster of letters creates word - 711 entries

Clean and group.

  • Best score: 17
  • Best player score: 21
  • Position: #114 / 167
  • Number of attempts: 2
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: #345 / 625
  • Number of attempts: 3
ninja substitution - 1302 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 15
  • Position: #115 / 248
  • Number of attempts: 3
Vice versa - 7536 entries

Little role switching.

  • Best score: 12
  • Best player score: 15
  • Position: #1079 / 2049
  • Number of attempts: 3
Free hyphen! - 149 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: #74 / 81
  • Number of attempts: 2
Put the months in order - 915 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: #93 / 155
  • Number of attempts: 2
Array transposition - 2312 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Position: #155 / 431
  • Number of attempts: 9
Collect List - 4184 entries

Convert to comma separated list.

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

Oops.

  • Best score: 10
  • Best player score: 13
  • Position: #1402 / 4116
  • Number of attempts: 3
Shift down - 191 entries

Number words are back.

  • Best score: 19
  • Best player score: 26
  • Position: #32 / 66
  • Number of attempts: 1
-a-b-c- - 3118 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 14
  • Position: #400 / 1112
  • Number of attempts: 2
Change name of a variable - 163 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 / 127
  • Number of attempts: 1
Words in parens - 12736 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1796 / 3919
  • Number of attempts: 2
Word frequency alignment - 245 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 / 146
  • Number of attempts: 4
abcd > a b c d - 263 entries

transform the single spaces into 4 spaces repeat for each line

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

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

  • Best score: 25
  • Best player score: 39
  • Position: #71 / 93
  • Number of attempts: 2
switch variable - 4945 entries

how fast can you switch two variable ?

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

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 12
  • Position: #48 / 141
  • Number of attempts: 4
Overall Vimgolf Rank - 161 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: 23
  • Best player score: 43
  • Position: #45 / 57
  • Number of attempts: 2
82 bottles of beer on the wall - 289 entries

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

  • Best score: 107
  • Best player score: 110
  • Position: #14 / 135
  • Number of attempts: 7
Bob Streams
Twitter:

entered into 29 challenges

contributed 0 challenges