Silent find and replace in Vim
Suppose that you call :ReplaceKbd
function. The function replaces \<kbd\>
with <kbd>
. When the pattern is not found you get a message:
Pattern now found: <kbd>
To mute the message out use e
flag like this:
:%s/<kbd>/<kbd>/e
This way when the term is not found, no error will be raised.
Written by Wojtek Ryrych
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#