Now that I know that vifm already supports 256 colors, I see a need for a related feature.
Sometimes I'm logged into a console or terminal window that DOESN'T support 256 colors. vifm's colorscheme file should provide a way to say which colors I should use in this case, while still allowing me to specify a different set of colors to use if I'm using a 256-color TERM.
In vim, for example, I can have the following in my .vimrc:
if &term =~? 'xterm-256color'
let &t_Co=256
colorscheme cgk256
else
colorscheme koehler
endif
I will have to look at the vim source code to see how they check the number of colors a term can handle. Ncurses just checks if the terminal will support colors. The infocmp program will return the number of colors a term can handle but I would like to use the most portable implementation.
Hi,
this feature request was opened long time ago and finally can be closed. The development version (which will be released as 0.7.4 soon) already supports if-else-endif statements. So you can add something like this to your vifmrc file:
milestone: -->
status: accepted --> closed