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

Simply Turn Yo To Hello

  • Best score: 10
  • Best player score: 10
  • Position: #74 / 518
  • Number of attempts: 1
Replace pattern with 1, 2, 3, ... on each line - 1098 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: #99 / 225
  • Number of attempts: 1
Simple, Practical, and Common - 33385 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: #2742 / 7364
  • Number of attempts: 4
Get mail address from outlook format - 621 entries

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

  • Best score: 15
  • Best player score: 16
  • Position: #101 / 196
  • Number of attempts: 3
prepend * to every non-blank line - 6208 entries

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

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

Just give me the numbers.

  • Best score: 14
  • Best player score: 17
  • Position: #1301 / 3842
  • Number of attempts: 3
V to the i - 4751 entries

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

  • Best score: 7
  • Best player score: 8
  • Position: #1443 / 1879
  • Number of attempts: 1
Add semicolons - 10792 entries

Simply add a semicolon at the end of each line

  • Best score: 10
  • Best player score: 11
  • Position: #1440 / 3044
  • Number of attempts: 1
html paragraph to table - 590 entries

reformat html paragraph to table

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

Clean and group.

  • Best score: 17
  • Best player score: 21
  • Position: #119 / 174
  • Number of attempts: 2
Copy three lines - 2840 entries

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

  • Best score: 13
  • Best player score: 18
  • Position: #349 / 635
  • Number of attempts: 3
ninja substitution - 1372 entries

How can you reuse a previous substitution ?

  • Best score: 14
  • Best player score: 15
  • Position: #120 / 261
  • Number of attempts: 3
Vice versa - 7805 entries

Little role switching.

  • Best score: 12
  • Best player score: 15
  • Position: #1106 / 2101
  • Number of attempts: 3
Free hyphen! - 159 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: #77 / 85
  • Number of attempts: 2
Put the months in order - 932 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: #96 / 158
  • Number of attempts: 2
Array transposition - 2378 entries

Transpose two arrays into one.

  • Best score: 16
  • Best player score: 17
  • Position: #159 / 443
  • Number of attempts: 9
Collect List - 4264 entries

Convert to comma separated list.

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

Oops.

  • Best score: 10
  • Best player score: 13
  • Position: #1417 / 4161
  • Number of attempts: 3
Shift down - 193 entries

Number words are back.

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

Put hyphens everywhere.

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

We should all ace this, right?

  • Best score: 13
  • Best player score: 15
  • Position: #1812 / 3946
  • Number of attempts: 2
Word frequency alignment - 274 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 / 157
  • Number of attempts: 4
abcd > a b c d - 280 entries

transform the single spaces into 4 spaces repeat for each line

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

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

  • Best score: 25
  • Best player score: 39
  • Position: #76 / 103
  • Number of attempts: 2
switch variable - 5036 entries

how fast can you switch two variable ?

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

Maybe a simple challenge.

  • Best score: 12
  • Best player score: 12
  • Position: #48 / 146
  • Number of attempts: 4
Overall Vimgolf Rank - 170 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: #46 / 57
  • Number of attempts: 2
82 bottles of beer on the wall - 303 entries

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

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

entered into 29 challenges

contributed 0 challenges