diff --git a/autoload/airline/themes/dark.vim b/autoload/airline/themes/dark.vim index 10f89a0..217b2f1 100644 --- a/autoload/airline/themes/dark.vim +++ b/autoload/airline/themes/dark.vim @@ -76,9 +76,13 @@ let g:airline#themes#dark#palette.inactive_modified = { \ } -" Accents are used to give parts within a section a slightly different look. -" Here we are defining a "red" accent, which is used by the 'readonly' part by -" default. +" Accents are used to give parts within a section a slightly different look or +" color. Here we are defining a "red" accent, which is used by the 'readonly' +" part by default. Only the foreground colors are specified, so the background +" colors are automatically extracted from the underlying section colors. What +" this means is that regardless of which section the part is defined in, it +" will be red instead of the section's foreground color. You can also have +" multiple parts with accents within a section. let g:airline#themes#dark#palette.accents = { \ 'red': [ '#ff0000' , '' , 160 , '' ] \ } diff --git a/doc/airline.txt b/doc/airline.txt index 8277501..9a2d465 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -438,6 +438,22 @@ And the following are defined for their respective extensions: `hunks`, `branch`, `tagbar`, `syntastic`, `whitespace` +------------------------------------- *airline-accents* +Accents can be defined on any part, like so: > + call airline#parts#define_accent('foo', 'red') +< +This will override the colors of that part by using what is defined in that +particular accent. In the above example, the `red` accent is used, which means +regardless of which section the part is used in, it will have red foreground +colors instead of the section's default foreground color. + +The following accents are defined by default. Themes can define their variants +of the colors, but defaults will be provided if missing. > + bold, italic, red, green, blue, yellow, orange, purple +< +The defaults configure the mode and line number parts to be bold, and the +readonly part to be red. + ------------------------------------- *airline-sections* Once a part is defined, you can use helper functions to generate the statuslines for each section. For example, to use the part above, we could