markonm / traces.vim

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

TracesSearch highlight group #15

Closed ivanbrennan closed 6 years ago

ivanbrennan commented 6 years ago

Create a TracesSearch highlight group for the current search pattern, linked to Search by default.

For colorschemes where 'Search' highlighting is subtle, it's nice to use something more distinct for things like global substitution.This is especially true if 'Search' has a similar appearance to 'Visual', because matches will be hard to see when a range is in effect.

To illustrate, I use a subtle Search highlight to make IncSearch stand out: incsearch

Before

When live-previewing a substitution, the Search group doesn't stand out as much as I'd like.

global: master-subst

range: master-range

After

Now I can customize TracesSearch to stand out more.

global: feature-subst

range: feature-range


The new group links to Search by default. Users interested in changing the highlight without delving into colorschemes can link it to another group in their vimrc. For example:

highlight! link TracesSearch IncSearch
markonm commented 6 years ago

Merged, thanks!

ivanbrennan commented 6 years ago

Thank you :tada: I really like this plugin!