Possible Duplicate:
How can I a put a line like “==========” quickly in vim
EDIT
Turns out this question is an exact duplicate of How can I a put a line like "==========" quickly in vim – but that one doesn’t have such a great title…
When editing markdown style files, I like to have
Some heading
------------
Notice the line matches the length of the heading?
Currently I do:
yyp:s/./-/g
But I was wondering if there is any better (less keystrokes) way to do this?
As I’ve just discovered, you can do it in a few less key strokes:
yypVr-– 7, if you include the shift key.