markonm / traces.vim

Range, pattern and substitute preview for Vim
MIT License
735 stars 13 forks source link

Turning the highlight off? #7

Closed for-coursera closed 6 years ago

for-coursera commented 6 years ago

What about adding the possibility to automatically turn the highlight off after an operation is completed (like, if substitute command was performed on a range – it still highlights search patterns outside the range then), or if the cursor was moved after a search (surely, that should exclude n/N movements)?

markonm commented 6 years ago

Are you talking about native hlsearch highlighting? The plugin currently disables hlsearch when highlighting patterns and returns it to prior state when exiting command line. hlsearch is not necessary for this plugin's behavior and can be switched off at all time.

for-coursera commented 6 years ago

I see. And this plugin also doesn't affect the usual search (//?) at all? Works only with : commands?

markonm commented 6 years ago

The plugin is only active inside : mode. It does not change value of / register. The actual command you execute from : mode will change the value of / register and consequently what hlsearch highlights, but that is standard Vim behavior.