vim-airline / vim-airline-themes

A collection of themes for vim-airline
MIT License
2.04k stars 348 forks source link

airline_term built-in vim terminal's tag isn't defined for most themes #180

Closed illia-danko closed 5 years ago

illia-danko commented 5 years ago

Hi. I believe is's better to define the airline_term in the most popular themes (or even in all of them) in order to provide a nicer user experience. For instance, we could pick the same settings as for airline_c: found that it's a pleasure to look at with my solarized light theme:

Before (use the default airline_term): airline_terminal_before

After patching:

let s:saved_theme = []

let g:airline_theme_patch_func = 'AirlineThemePatch'
function! AirlineThemePatch(palette)
    for colors in values(a:palette)
        if has_key(colors, 'airline_c') && len(s:saved_theme) ==# 0
            let s:saved_theme = colors.airline_c
        endif
        if has_key(colors, 'airline_term')
            let colors.airline_term = s:saved_theme
        endif
    endfor
endfunction

and applying the same colors as for airline_c I have: airline_terminal_after which is arguably (but likely) much better for eyes.

chrisbra commented 5 years ago

I have refrained to add the airline_theme group to the existing themes mainly because I am not good at theming and do not really know what would look good per theme. However I am not opposed to add custom airline_term sections to specific themes. PRs appreciated.