tommcdo/vim-exchange

Add option to set custom colors

PetarMetodiev opened this issue · 1 comments

Is it possible to expose some kind of variable for setting custom color or is there any other way to do that?

I am not familiar with vimL, so sorry if this comes as a stupid question.

Thanks

Hello!

Exchange.vim defines a highlight group called ExchangeRegion. By default, it's linked to the IncSearch highlight group (this is just a convenience; I didn't want to choose colors that might clash with people's color schemes), meaning it will look the same as search terms when have incremental search turned on. This can be overridden.

You can take a look at :help :higlight to go in-depth (though it's not a very pleasant read). In summary, you can do things like this:

highlight ExchangeRegion ctermfg=red guifg=#ff0000

to change the text color to red; or

highlight link ExchangeRegion Comment

to use the same highlighting as comments.

Hope that's helpful!