On Fri, Mar 08, 2013 at 10:44:37PM +0100, Bram Moolenaar wrote:
>
> Sung Pae wrote:
>
> > On Fri, Jan 25, 2013 at 03:07:45AM -0600, Brian Lewis wrote:
> >
> > > After ":silent !", vim looks blank. I have to ^L or ":redraw!" to make
> > > it look normal.
> >
> > I decided I wanted to change this as well; simple patch is attached. It
> > appears that when do_shell() is called while msg_silent > 0, the screen
> > is not set to redraw. This may be by design, so I'm not advocating for
> > change, but you may find it useful.
>
> The point of using silent with a shell command is that Vim will not
> redraw the screen.  If you want to update the screen, just leave out the
> silent.

I think the major reason why people prepend `silent` to `!` commands is
to avoid the "Press Enter to continue" prompt, as recommended in the
help:

        Vim redraws the screen after the command is finished,
        because it may have printed any text.  This requires a
        hit-enter prompt, so that you can read any messages.
        To avoid this use: >
                :silent !{cmd}

But now that I think of it, if I want to avoid affecting the screen at
all, it would be more appropriate to use `call system(…)`. Perhaps this
deserves a mention in this section of the documentation?

    guns

-- 
-- 
You received this message from the "vim_dev" 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 because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui