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:
Before
When live-previewing a substitution, the Search group doesn't stand out as much as I'd like.
global:
range:
After
Now I can customize TracesSearch to stand out more.
global:
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:
Create a
TracesSearch
highlight group for the current search pattern, linked toSearch
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:
Before
When live-previewing a substitution, the Search group doesn't stand out as much as I'd like.
global:
range:
After
Now I can customize TracesSearch to stand out more.
global:
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: