@bling
Accents are interesting !
Perhaps you could add how to configure/change accents, in the docs (like the way you explained how to change sections in airline) or, you can explain them in the default dark theme ?
please let me know if it's still unclear. thanks.
This is good :smile: , But I'd be really happy if you can provide the example code that creates this

Also, what other keywords/words can be used apart from red ?
here it is!
function! AccentDemo()
let keys = ['a','b','c','d','e','f','g','h']
for k in keys
call airline#parts#define_text(k, k)
endfor
call airline#parts#define_accent('a', 'red')
call airline#parts#define_accent('b', 'green')
call airline#parts#define_accent('c', 'blue')
call airline#parts#define_accent('d', 'yellow')
call airline#parts#define_accent('e', 'orange')
call airline#parts#define_accent('f', 'purple')
call airline#parts#define_accent('g', 'bold')
call airline#parts#define_accent('h', 'italic')
let g:airline_section_a = airline#section#create(keys)
endfunction
autocmd VimEnter * call AccentDemo()
Thanks ! :smile: :+1:
Accents are great, I should be able to replace all of my hacks for showing the line number in bold yellow with just defining an accent for it. However I don't quite understand how to define a "bold yellow" accent -- either one works but both combined do not. I've also tried this:
let g:airline_section_z='%3p%% î‚¡%#__accent_bold#%#__accent_yellow#%4l%#__restore__#:%3v'
but it doesn't work neither, the yellow accent just replaces the bold one. What would be the simplest (and working :-) way to do this? TIA!
combining two accents is tricky and not supported out of the box...you'd have to define that accent manually.
accents are just a special type of highlight group where the background color is ignored (and uses current section's background color, whatever it is). there's an accents dictionary defined in every theme, so the following should do the trick for you.
function! AirlineThemePatch(palette)
let a:palette.accents.bold_yellow = [ '#ffffff', '', 0, '', 'bold' ]
endfunction
let g:airline_theme_patch_func = 'AirlineThemePatch'
and then just define a part to use the bold_yellow accent.
Excellent, this works just fine, thanks a lot!
@bling
I am using vim-colors-solarized + vim-airline.
Then yellow background+white font makes my eyes uncomfortable. Is there any solution?
@harriszh you can patch the theme just before it gets loaded. there's an example in the documentation, see here.
@bling, Thanks. I read the doc and find how to select the theme.
now I have another issue. You can see the screen capture. why the color can
cross << and >>?
2013/11/4 Bailey Ling [email protected]
@harriszh https://github.com/harriszh you can patch the theme just
before it gets loaded. there's an example in the documentation, see herehttps://github.com/bling/vim-airline/blob/master/doc/airline.txt#L83
.—
Reply to this email directly or view it on GitHubhttps://github.com/bling/vim-airline/issues/299#issuecomment-27684515
.
BTW: I doesn't have any conf related airline in my vimrc. I use default
configuration.
2013/11/4 Harris Zhu [email protected]
@bling, Thanks. I read the doc and find how to select the theme.
now I have another issue. You can see the screen capture. why the color
can cross << and >>?2013/11/4 Bailey Ling [email protected]
@harriszh https://github.com/harriszh you can patch the theme just
before it gets loaded. there's an example in the documentation, see herehttps://github.com/bling/vim-airline/blob/master/doc/airline.txt#L83
.—
Reply to this email directly or view it on GitHubhttps://github.com/bling/vim-airline/issues/299#issuecomment-27684515
.
@harriszh please open up a new issue as this doesn't have anything to do with accents. also, none of your attachments made it through to github so i can't see anything. thanks.
@bling, I create one issue. but I can't upload pictures in forum.
2013/11/4 Bailey Ling [email protected]
@harriszh https://github.com/harriszh please open up a new issue as
this doesn't have anything to do with accents. also, none of your
attachments made it through to github so i can't see anything. thanks.—
Reply to this email directly or view it on GitHubhttps://github.com/bling/vim-airline/issues/299#issuecomment-27693639
.
Hi
thanks for your work bling.
Do you know how can I resolve graphic problem with right separators, I've got space between bar and separator ?

@bart-kow that's a known issue and there's nothing i can do to fix it. try different a different font, font size, terminal, or any combination of the previous and there will be at least one combo that'll work for you.
Hi
I don't have idea how to apply an accent to the part of text, when _lucius_ colorscheme is enabled. Line below does not work:
let g:airline_section_a = 'b%n, w%{winnr()}%#__accent_bold#%{winnr()==winnr("#")?" [LW]":""}%#__restore__#'
@paprykarz so it works for other colorschemes? that doesn't make sense....
same problem as @bart-kow, under windows gvim, use powerline patchfont(Meslo LG S Regular for Powerline.otf) , got large spaces between seprator and bar, sorry, my English is very poor
Most helpful comment
here it is!