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

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #74 / 522
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1114 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: #101 / 228
  • Number of attempts: 1
Simple, Practical, and Common - 33483 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: #2747 / 7384
  • Number of attempts: 4
Get mail address from outlook format - 642 entries

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

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

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

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

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1306 / 3852
  • Number of attempts: 3
V to the i - 4771 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1445 / 1887
  • Number of attempts: 1
Add semicolons - 10831 entries

Simply add a semicolon at the end of each line

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

reformat html paragraph to table

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

Clean and group.

  • Best score: 17
  • Best player score: 21
  • Position: #122 / 177
  • Number of attempts: 2
Copy three lines - 2869 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 / 639
  • Number of attempts: 3
ninja substitution - 1399 entries

How can you reuse a previous substitution ?

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

Little role switching.

  • Best score: 12
  • Best player score: 15
  • Position: #1109 / 2114
  • Number of attempts: 3
Free hyphen! - 165 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: #78 / 88
  • Number of attempts: 2
Put the months in order - 972 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: #99 / 161
  • Number of attempts: 2
Array transposition - 2407 entries

Transpose two arrays into one.

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

Convert to comma separated list.

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

Oops.

  • Best score: 10
  • Best player score: 13
  • Position: #1419 / 4166
  • Number of attempts: 3
Shift down - 194 entries

Number words are back.

  • Best score: 19
  • Best player score: 26
  • Position: #33 / 68
  • Number of attempts: 1
-a-b-c- - 3183 entries

Put hyphens everywhere.

  • Best score: 13
  • Best player score: 14
  • Position: #404 / 1132
  • Number of attempts: 2
Change name of a variable - 173 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 / 136
  • Number of attempts: 1
Words in parens - 12868 entries

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1814 / 3950
  • Number of attempts: 2
Word frequency alignment - 278 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 / 159
  • Number of attempts: 4
abcd > a b c d - 282 entries

transform the single spaces into 4 spaces repeat for each line

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

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

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

how fast can you switch two variable ?

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

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 12
  • Position: #48 / 147
  • Number of attempts: 4
Overall Vimgolf Rank - 171 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: #47 / 58
  • Number of attempts: 2
82 bottles of beer on the wall - 307 entries

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

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

entered into 29 challenges

contributed 0 challenges