Friday, September 21, 2012

Re: a small plugin for :call system() in vim

Dear Vimers,

I have a simple question. Since I want to mentain a nice history for the
plugin proposed below. The idea is to add history entry for the command
that was given by the user, then the plugin changes it to :call system()
and this is also remembered in the history. I'd like to remove this
entry from the history but ShellFilterPost autocommand is not fired in
this case (since we do not run a command throgh :!). So the question is
how to delete the last history item (via autocommand). I thought that it
would be nice to disable history and then reset it back, but there is
the same problem: how to reset it back (and as far as I can see, setting
'history' to 0 will cut the history).

Best regards,
Marcin Szamotulski



On 18:38 Fri 21 Sep , Marcin Szamotulski wrote:
> On 19:33 Fri 21 Sep , Marc Weber wrote:
> > Excerpts from Marcin Szamotulski's message of Fri Sep 21 19:21:23 +0200 2012:
> > > Hello,
> > >
> > > I just have found a neat way for doing:
> > > :echo system('command')
> >
> > why is echo system('command') better than :! ?
> >
> > Using :! you can stop it using ctrl-c again.
> > The only advantage I could see is that % is not treated specially.
> > Ah, its about completion ?
> Yes it is! and how less you need to type, and how nice it looks ;)
> Hmm, you are right % is not treated specially, but I think it is
> a disadvantage, though.
>
> Marcin Szamotulski
>
> >
> > Marc Weber
> >
> > --
> > 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

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

No comments:

Post a Comment