Surgical Replace
1) search with / like normal
2) make your change, but in one edit so that it's repeatable
3) find next with "n" and replace as necessary with "."
It's easier than %s/a/b/c and gives you surgical control over what to replace.
Common examples I use:
/true[CR]cefalse[ESC]n.nnn.
/ClassName[CR]ceNewClassName[ESC]n.n.nn.
Written by Benjamin Sullivan
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#