On Sat, Oct 25, 2008 at 3:15 PM, Daniel Choi <[EMAIL PROTECTED]> wrote:
>
> I use Markdown for a lot of things, and it would be convenient to be
> able to type things like this:
>
> Header
> ======
>
> What's the easiest way to output just enough equal signs or dashes to
> match the character length of the previous line? I'd like a solution
> that doesn't require manually counting the characters.

My super fantastic non counting way is as follows:
yy
p
v<End>
r=

So, yank and put the Header line.
Hit v to enter character-wise visual mode.
Hit the <End> key to highlight from the beginning of the "H" to the
end of the line.
Hit r (to replace the entire visually selected area)
Hit = (to replace the select with the character "=" or "-").

Voila.
Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to