Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
0 votes
in vifm by

Instead of having a defined, static highlight color, it would be more useful to have the highlight color be the text's color. When highlighted, the text's color should match the background colors. This would guarantee that the text is always readable.

1 Answer

0 votes
by
 
Best answer

It depends on color scheme, inverting colors doesn't necessary guarantee good readability on its own. Anyway, it's easy to add such behaviour by specifying reverse attribute for CurrLine highlight group (might want to see related help). Like in the following line:

highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=blue
by

Perfect!

The reverse attribute yields more elegant results than a fixed color:
As long as the font color is readable on the background, it will (by definition) be readable when highlighted, which is clearly not true with vifm's current settings.

See how vifm's current highlighting compares to ranger's in terms of readability:

highlight_vifm-ranger

May I suggest changing the default colorscheme?

highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=default
by

You're right, I missed changing ctermbg=blue part and that's why it wasn't looking good.

I actually do use

highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=default

myself. Seems to be worth using it by default, thanks!

by

You could change it in the next release, if you haven't done it already.

by

I did the change in September, so it will be in 0.8.1.

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.
...