4 ms·
visual selection replacement is good too. :'<,'>s/this/to that/g I think vim does that automatically when you have a selection active and hit :
by weaksauce 14y ago
visual selection replacement is good too.
:'<,'>s/this/to that/g
I think vim does that automatically when you have a selection active and hit :
- caioariede 14y agoNote that this will replace over the entirely lines even if it's a blockwise selection. So you might consider using :'<,'>s/\%Vthis/to that/g
- weaksauce 14y agoIt might be a setting or something but it definitely doesn't do that on my machine or the linux machine I have in the cloud. this ipsum dolor sit amet this ipsum dolor sit amet this ipsum dolor sit amet this ipsum dolor sit amet this ipsum dolor sit amet select the middle 3 lines and do what I said will give you: this ipsum dolor sit amet to that ipsum dolor sit amet to that ipsum dolor sit amet to that ipsum dolor sit amet this ipsum dolor sit amet