VISUAL MODE: Search and replace in selected

on select there are

'< start line
`< start character
'> end line
`> end character

Imagine that you have visual region selected. so to replace press : and in command there is :'<,'> in command line already entered. So you should add to this s/<word1>/<word2>/g
or if You want to change in last selected region in Normal mode type:

:'<,'>  s/start/end/g

to search by only visual region you should in Normal mode:

:\%Vword1

Comments

comments powered by Disqus