On Apr 13, 3:53 pm, Tim Chase <[email protected]> wrote:
>
> While this works for expressions (the followup question about
> "echo 25*47"), it doesn't satisfy the OP's request for arbitrary
> Ex commands.  Assuming the commands to be executed don't include
> redirs and there's not a redir already in process (that you don't
> want to terminate), it could be wrapped in a function
>
>   function! Capture(excmds)
>     redir => s:results
>     exec a:excmds
>     redir END
>     return s:results
>   endfunction

Forgot to ask , why not use a local variable i.e. l:results ?

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to