Vim: Search and replace inside a visual selection
Select the block of code you want to search and replace then type:
:s/\%Vfoo/bar/g
For more information, type:
:help \%V
Written by Caio Ariede
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#