Redir doesn't work for commands that don't post their output in the Vim
window (such as system commands). If it is your intention to post the
output of a system command into your buffer, you can instead do:
:r!ls
If it is simply to SEE the output, then system() is sufficient -- I'm
fairly certain that it exists in Vim 6.3+ and doesn't require 7.
Salman.
> > Assume I am in a Gvim session and I hit an F-key which in turn
> > executes an external program. The external program directs text to
> > sysout. Can I make this appear in the Gvim text? Or do I need to
> > direct it to a temp file and have a
> >
> > :read
> >
> > function in the script?
>
> For Vim6.x use :redir ::
>
> :redir @a
> :silent !ls
> :redir END
>
> For Vim7 also system() ::
>
> :let a = system('ls')
>
> m.