Daniel Choi (2008-10-25 12:15 -0700):

> 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.

This is a mapping for normal mode:

    map <F5> :execute 'normal! O' . 
substitute(getline(line('.')-1),'.','=','g')<CR><CR>

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

Reply via email to