Vim

Find And Replace In Selection In Vim

Posted by Weston Ganger on May 21, 2015

I was wanting to find and replace in my selection when using VIM but my usual methods were changing on the entire line even if I only selected a small portion of a line

This method will only do the selection area, not the entire line(s).


# replace 'original' with 'replacement'
:%s/\%Voriginal/replacement/g


Related External Links:


Posted in Linux and Tagged with vim linux find-and-replace 


Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts