When I split VIM to show me a few files or a different parts of the same file, is there any way for me to have one search in one window and a different search in another one? For instance, I'd like the upper window to have the search pattern foo
and the lower window to have the search pattern bar
.
The active search pattern affects what is highlighted when using search highlighting, and it is pretty annoying when I have foo
highlighted in the upper window, and then I switch to the lower window and search for bar
, and foo
stops being highlighted in the upper window.
Edit: This question seems to be related, though I'm not sure it's an exact duplicate.
I use this script for highlighting multiple search patterns.
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