vi - Omit 'Pattern not found' error message in Vim script -
I added a function in my .vimrc which is less search and replace commands however although no one pattern has found me I get an error message through which I have to login, how can I suppress it?
You can either : silent
or : silent!
As a prefix for any command or you can add option 'e' to the option, which is often easier.
:% S / x / y / ge: Quiet! % S / x / y / g: mute% s / x / y / g
For more information, see
: Help: Quiet: Help: S_flags
e
flag information : s_flags
are some paragraphs below help.
Comments
Post a Comment