Hi Gary!
On Fr, 09 Nov 2012, Gary Johnson wrote:
> On 2012-11-09, Johannes Deutsch wrote:
> > Hi all,
> >
> > i wonder, why i can't scroll back the messages from an external command
> > that i invoked within vim via
> >
> > :!<cmd>
> >
> > Right after the command is executed vim puts the whole output of the
> > command on the screen without the more-prompt. Therefore, if the number
> > of lines exceeds the height of the terminal vim is running in, i can't
> > access the first few lines.
>
> When Vim executes an internal command, it sends the output through
> its pager. When Vim executes an external command with :!, it gets
> out of the way and releases control of the terminal to that external
> program.
>
> One way to solve that is to pipe <cmd>'s output to less:
>
> :!<cmd> | less
>
> Another is to use Vim's system command to execute <cmd>:
>
> :echo system('<cmd>')
>
> which will use Vim's pager.
>
> This topic was just discussed a few weeks ago but I can't find the
> thread at the moment. I think one of the replies included a script
> that helps solve this problem by using system() but also allowing
> file name expansion on the command line.
The thread was called "a small plugin for :call system() in vim"นฒ
and one pluginณ was mentioned.
__
น https://groups.google.com/d/topic/vim_use/pnyP4Ac3xPQ/discussion
ฒ https://groups.google.com/group/vim_use/msg/f903505fb9fdf9d9?hl=de
ณ http://www.vim.org/scripts/script.php?script_id=4224
regards,
Christian
--
--
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
Friday, November 9, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment