Linux

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 


Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts