On 18/03/09 10:26, Maxim Kim wrote:
>
> Hi,
>
> What is if it exist the right way to run vimscript from a buffer
> without saving it first?
> I know about :@" but it can't process vimscript's longlines. If I copy
> the following lines into unnamed register:
>
> map<F4> m`:silent! %s/\(\s\+$\)\\|\(\r$\)//g<CR>``
> \:echo "Remove trailing spaces and ^Ms ..."<CR>
>
> and try to run it using :@" I get the error E10.
See ":help E10" and check your backslashes. Also, what does
:verbose set cp?
(with the question mark) tell you?
Anyway, the safest way to run a (possibly long) vimscript is to source
it after having saved it. Why don't you want to save your script?
Best regards,
Tony.
--
"It's men like him that give the Y chromosome a bad name."
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---