When I use search in vim with /
command, while typing in characters, I am able to see first occurrence of searched regular expression pattern via highlighting in text area of vim. However, while using :s
command, I want to be able to see first occurrence highlighted as I type pattern for what-to-substitute block, but I see no highlighting, as I understand, it is because of command-mode, which is give no highlighting even for search via /
in it.
For example, as I type :s/foo/bar
, if there's any fo
sequence in text, I want it to be highlighted after I typed in :s/fo
, but it is not.
Does anybody knows any workaround for this? thx.
You can't: :s
is a :
command, not a search command, and highlighting can only be done on search commands.
But despair not!
/foo
highlights stuff, then :s//bar
replaces stuff using the last search string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With