On 2010-05-19, robert song wrote:
> > Yes, :! will start a new shell to run the command in.  Since it's new, it
> > has no history.  Try:
> >
> > :!echo "I haz history";history
> 
> Shawn,
> thank you for your reply,
> so is there any way to read the history result to current window ?
> just like the other command :r!date.
> If this can be done, it's convenient to search for some commands and
> execute in the vim.

This behavior depends on the shell you're using and how it's
configured.  For example, on one Linux system running some version
of ksh, I get the results you describe.  On another Linux system
running a different version of ksh, executing ":!history" lists the
last 16 commands.

I'd look at the man page for the shell you're using, search for
"history", and see if the behavior you desire can be configured.

HTH,
Gary

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