<<< Date Index >>>     <<< Thread Index >>>

Re: need help with editor syntax



On 2009-01-16, Asif Iqbal <vadud3@xxxxxxxxx> wrote:
> Hi
> 
> my editor is setup like this
> 
> set editor='vim + -c "set textwidth=72" -c "set wrap" -c "set nocp" -c
> "?^$" -c "g/.\+-- $/normal d}"'
> 
> Every time I try to compose an email I get this warning
> 
> "~/Maildir/tmp/mutt-qmail-22249-22" 14L, 301C
> E486: Pattern not found: .\+-- $
> Press ENTER or type command to continue
> 
> Any suggestion on how to fix this warning ?

Use the :silent command.  That is, replace

    -c "g/.\+-- $/normal d}"'

with 

    -c "silent g/.\+-- $/normal d}"'

Also, it's not a good idea to execute "set nocp" anywhere but at
the very start of the initialization process.  I would recommend not
using that setting at all but instead adding the "-N" option to your
vim command.  That will accomplish the same thing but more safely.

For more details, see

    :help :silent
    :help -N

Regards,
Gary