vim-airline / vim-airline-themes

A collection of themes for vim-airline
MIT License
2.06k stars 350 forks source link

Unthemed character between vertically split status lines #48

Closed liitii closed 8 years ago

liitii commented 8 years ago

I've tried several themes and none colour/style the character that appears below the vertical split column and between statuslines. I'm using the molokai theme, and have overridden the vertical split bg colour and character (a space) in my .vimrc to match, but that has no effect on this character. whatchar

If it's not part of airline, it'd be nice to know what it is so I can change it using another hi … override.

liitii commented 8 years ago

This seems to work for me but I think theming split boundaries is something airline would be better off doing.

hi StatusLine ctermfg=67
hi StatusLineNC ctermfg=67

You may need guifg instead/as well.

chrisbra commented 8 years ago

I think, this is not something vim-airline can do.

liitii commented 8 years ago

I managed to hack it in to my .vimrc. I'm sure you could do a better job:

set fillchars+=vert:█
au User AirlineAfterInit,AirlineAfterTheme call FixSplitColours()
fun! FixSplitColours()
    let l:theme = get(g:, 'airline_theme', g:colors_name)
    let l:termColour = g:airline#themes#{l:theme}#palette['inactive']['airline_a'][3]
    exec 'hi VertSplit ctermfg=' . l:termColour
    exec 'hi StatusLine ctermfg=' . l:termColour
    exec 'hi StatusLineNC ctermfg=' . l:termColour
endfun
Roy-Orbison commented 5 years ago

This is still a bug. The whole middle split is unstyled: image It doesn't make sense; Airline styles all other non-code window parts, so why not this?

I used that fix but set both fg and bg split colours the same and left fillchars alone.

chrisbra commented 5 years ago

Note, airline does not style non-code windows It styles the statusline and possibly the tabline. It does this by adjusting the defined interface for defining those options within Vim. It does not in general override specific (default) highlighting groups. So no, this is not a bug.

Now this is an open-source project. So if you want to have changes made, you might as well just propose a PR to get this issue fixed.

BTW: I have just made a small test. It looks like all is needed is to set the Statusline and StatuslineNC highlighting group to the desired color. Since airline does not change this default highlighting group, you can just set this in your preferred colorscheme and to adjust it to changed color schemes, set it again on a ColorScheme autocommand.

Roy-Orbison commented 5 years ago

non-code window parts

I meant the furniture: statuslines, tablines, Ctrl + P, etc. Perhaps bug is too strong a word, then, but definitely a deficiency. This project brings great clarity to vim windows, and vertical splits are definitely part of pane delineation. Airline statuses take care of horizontal splits, so why not extend this styling to vertical ones?

Yes, those highlighting groups are in the workaround, above. I am doing that. It seems clunky to add this in with the hack/fix above when the best place to determine which colour to set, and when, is in Airline.

I can probably put something together; I'm not great at viml. It just seemed as though you're against it.

chrisbra commented 5 years ago

You don't need to set VertSplit highlighting group. Also and this is a problem, to what should Statusline and StatuslineNC be set? Depending on where the window separator hits the statusline, this will most likely still cause a visual glitch. I can probably initialize those groups to airline_c but that won't work properly in all cases.

Roy-Orbison commented 5 years ago

Yeah, sorry this is really two issues. That character in the status is solved by setting Statusline and StatuslineNC, and setting VertSplit colours makes the border between vertically split panes match the other parts of Airline.

Roy-Orbison commented 2 years ago

I know I linked to it in the other issue, but for others looking for a solution here's the plugin I wrote: https://github.com/Roy-Orbison/airline-colour-splits