2020-01-06 02:22:49 +00:00
|
|
|
" MIT License. Copyright (c) 2013-2020 Bailey Ling et al.
|
2018-01-05 09:37:59 +00:00
|
|
|
" vim: et ts=2 sts=2 sw=2 tw=80
|
|
|
|
|
2016-09-24 00:16:30 +00:00
|
|
|
scriptencoding utf-8
|
|
|
|
|
2016-08-10 01:08:58 +00:00
|
|
|
" Airline themes are generated based on the following concepts:
|
|
|
|
" * The section of the status line, valid Airline statusline sections are:
|
|
|
|
" * airline_a (left most section)
|
|
|
|
" * airline_b (section just to the right of airline_a)
|
|
|
|
" * airline_c (section just to the right of airline_b)
|
|
|
|
" * airline_x (first section of the right most sections)
|
|
|
|
" * airline_y (section just to the right of airline_x)
|
|
|
|
" * airline_z (right most section)
|
|
|
|
" * The mode of the buffer, as reported by the :mode() function. Airline
|
|
|
|
" converts the values reported by mode() to the following:
|
|
|
|
" * normal
|
|
|
|
" * insert
|
|
|
|
" * replace
|
|
|
|
" * visual
|
|
|
|
" * inactive
|
|
|
|
" The last one is actually no real mode as returned by mode(), but used by
|
|
|
|
" airline to style inactive statuslines (e.g. windows, where the cursor
|
|
|
|
" currently does not reside in).
|
|
|
|
" * In addition to each section and mode specified above, airline themes
|
|
|
|
" can also specify overrides. Overrides can be provided for the following
|
|
|
|
" scenarios:
|
|
|
|
" * 'modified'
|
|
|
|
" * 'paste'
|
2013-07-24 03:00:23 +00:00
|
|
|
"
|
2016-08-10 01:08:58 +00:00
|
|
|
" Airline themes are specified as a global viml dictionary using the above
|
|
|
|
" sections, modes and overrides as keys to the dictionary. The name of the
|
|
|
|
" dictionary is significant and should be specified as:
|
|
|
|
" * g:airline#themes#<theme_name>#palette
|
|
|
|
" where <theme_name> is substituted for the name of the theme.vim file where the
|
|
|
|
" theme definition resides. Airline themes should reside somewhere on the
|
|
|
|
" 'runtimepath' where it will be loaded at vim startup, for example:
|
|
|
|
" * autoload/airline/themes/theme_name.vim
|
2013-07-24 03:00:23 +00:00
|
|
|
"
|
2016-08-10 01:08:58 +00:00
|
|
|
" For this, the dark.vim, theme, this is defined as
|
2013-09-15 15:59:22 +00:00
|
|
|
let g:airline#themes#dark#palette = {}
|
|
|
|
|
2016-08-10 01:08:58 +00:00
|
|
|
" Keys in the dictionary are composed of the mode, and if specified the
|
|
|
|
" override. For example:
|
|
|
|
" * g:airline#themes#dark#palette.normal
|
|
|
|
" * the colors for a statusline while in normal mode
|
|
|
|
" * g:airline#themes#dark#palette.normal_modified
|
|
|
|
" * the colors for a statusline while in normal mode when the buffer has
|
|
|
|
" been modified
|
|
|
|
" * g:airline#themes#dark#palette.visual
|
|
|
|
" * the colors for a statusline while in visual mode
|
|
|
|
"
|
|
|
|
" Values for each dictionary key is an array of color values that should be
|
|
|
|
" familiar for colorscheme designers:
|
|
|
|
" * [guifg, guibg, ctermfg, ctermbg, opts]
|
|
|
|
" See "help attr-list" for valid values for the "opt" value.
|
|
|
|
"
|
|
|
|
" Each theme must provide an array of such values for each airline section of
|
|
|
|
" the statusline (airline_a through airline_z). A convenience function,
|
|
|
|
" airline#themes#generate_color_map() exists to mirror airline_a/b/c to
|
|
|
|
" airline_x/y/z, respectively.
|
|
|
|
|
|
|
|
" The dark.vim theme:
|
|
|
|
let s:airline_a_normal = [ '#00005f' , '#dfff00' , 17 , 190 ]
|
|
|
|
let s:airline_b_normal = [ '#ffffff' , '#444444' , 255 , 238 ]
|
|
|
|
let s:airline_c_normal = [ '#9cffd3' , '#202020' , 85 , 234 ]
|
|
|
|
let g:airline#themes#dark#palette.normal = airline#themes#generate_color_map(s:airline_a_normal, s:airline_b_normal, s:airline_c_normal)
|
|
|
|
|
|
|
|
" It should be noted the above is equivalent to:
|
|
|
|
" let g:airline#themes#dark#palette.normal = airline#themes#generate_color_map(
|
|
|
|
" \ [ '#00005f' , '#dfff00' , 17 , 190 ], " section airline_a
|
|
|
|
" \ [ '#ffffff' , '#444444' , 255 , 238 ], " section airline_b
|
|
|
|
" \ [ '#9cffd3' , '#202020' , 85 , 234 ] " section airline_c
|
|
|
|
" \)
|
|
|
|
"
|
|
|
|
" In turn, that is equivalent to:
|
|
|
|
" let g:airline#themes#dark#palette.normal = {
|
|
|
|
" \ 'airline_a': [ '#00005f' , '#dfff00' , 17 , 190 ], "section airline_a
|
|
|
|
" \ 'airline_b': [ '#ffffff' , '#444444' , 255 , 238 ], "section airline_b
|
|
|
|
" \ 'airline_c': [ '#9cffd3' , '#202020' , 85 , 234 ], "section airline_c
|
|
|
|
" \ 'airline_x': [ '#9cffd3' , '#202020' , 85 , 234 ], "section airline_x
|
|
|
|
" \ 'airline_y': [ '#ffffff' , '#444444' , 255 , 238 ], "section airline_y
|
|
|
|
" \ 'airline_z': [ '#00005f' , '#dfff00' , 17 , 190 ] "section airline_z
|
|
|
|
" \}
|
|
|
|
"
|
|
|
|
" airline#themes#generate_color_map() also uses the values provided as
|
|
|
|
" parameters to create intermediary groups such as:
|
|
|
|
" airline_a_to_airline_b
|
|
|
|
" airline_b_to_airline_c
|
|
|
|
" etc...
|
2013-07-24 03:00:23 +00:00
|
|
|
|
2013-08-02 17:56:12 +00:00
|
|
|
" Here we define overrides for when the buffer is modified. This will be
|
2013-08-18 00:59:49 +00:00
|
|
|
" applied after g:airline#themes#dark#palette.normal, hence why only certain keys are
|
2013-08-02 17:56:12 +00:00
|
|
|
" declared.
|
2013-08-18 00:59:49 +00:00
|
|
|
let g:airline#themes#dark#palette.normal_modified = {
|
2013-08-17 19:20:40 +00:00
|
|
|
\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] ,
|
2013-07-06 00:41:59 +00:00
|
|
|
\ }
|
2013-06-30 21:41:21 +00:00
|
|
|
|
2013-07-11 03:03:27 +00:00
|
|
|
|
2016-08-10 01:08:58 +00:00
|
|
|
let s:airline_a_insert = [ '#00005f' , '#00dfff' , 17 , 45 ]
|
|
|
|
let s:airline_b_insert = [ '#ffffff' , '#005fff' , 255 , 27 ]
|
|
|
|
let s:airline_c_insert = [ '#ffffff' , '#000080' , 15 , 17 ]
|
|
|
|
let g:airline#themes#dark#palette.insert = airline#themes#generate_color_map(s:airline_a_insert, s:airline_b_insert, s:airline_c_insert)
|
2013-08-18 00:59:49 +00:00
|
|
|
let g:airline#themes#dark#palette.insert_modified = {
|
2013-08-17 19:20:40 +00:00
|
|
|
\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] ,
|
2013-07-06 00:41:59 +00:00
|
|
|
\ }
|
2013-08-18 00:59:49 +00:00
|
|
|
let g:airline#themes#dark#palette.insert_paste = {
|
2016-08-10 01:08:58 +00:00
|
|
|
\ 'airline_a': [ s:airline_a_insert[0] , '#d78700' , s:airline_a_insert[2] , 172 , '' ] ,
|
2013-07-08 11:51:01 +00:00
|
|
|
\ }
|
2013-07-11 03:03:27 +00:00
|
|
|
|
|
|
|
|
2013-08-18 00:59:49 +00:00
|
|
|
let g:airline#themes#dark#palette.replace = copy(g:airline#themes#dark#palette.insert)
|
2016-08-10 01:08:58 +00:00
|
|
|
let g:airline#themes#dark#palette.replace.airline_a = [ s:airline_b_insert[0] , '#af0000' , s:airline_b_insert[2] , 124 , '' ]
|
2013-08-18 00:59:49 +00:00
|
|
|
let g:airline#themes#dark#palette.replace_modified = g:airline#themes#dark#palette.insert_modified
|
2013-07-11 03:03:27 +00:00
|
|
|
|
2013-06-30 21:41:21 +00:00
|
|
|
|
2016-08-10 01:08:58 +00:00
|
|
|
let s:airline_a_visual = [ '#000000' , '#ffaf00' , 232 , 214 ]
|
|
|
|
let s:airline_b_visual = [ '#000000' , '#ff5f00' , 232 , 202 ]
|
|
|
|
let s:airline_c_visual = [ '#ffffff' , '#5f0000' , 15 , 52 ]
|
|
|
|
let g:airline#themes#dark#palette.visual = airline#themes#generate_color_map(s:airline_a_visual, s:airline_b_visual, s:airline_c_visual)
|
2013-08-18 00:59:49 +00:00
|
|
|
let g:airline#themes#dark#palette.visual_modified = {
|
2013-08-17 19:20:40 +00:00
|
|
|
\ 'airline_c': [ '#ffffff' , '#5f005f' , 255 , 53 , '' ] ,
|
2013-07-06 00:41:59 +00:00
|
|
|
\ }
|
2013-07-13 02:39:38 +00:00
|
|
|
|
|
|
|
|
2016-08-10 01:08:58 +00:00
|
|
|
let s:airline_a_inactive = [ '#4e4e4e' , '#1c1c1c' , 239 , 234 , '' ]
|
|
|
|
let s:airline_b_inactive = [ '#4e4e4e' , '#262626' , 239 , 235 , '' ]
|
|
|
|
let s:airline_c_inactive = [ '#4e4e4e' , '#303030' , 239 , 236 , '' ]
|
|
|
|
let g:airline#themes#dark#palette.inactive = airline#themes#generate_color_map(s:airline_a_inactive, s:airline_b_inactive, s:airline_c_inactive)
|
2013-09-05 20:45:12 +00:00
|
|
|
let g:airline#themes#dark#palette.inactive_modified = {
|
2013-09-05 20:47:38 +00:00
|
|
|
\ 'airline_c': [ '#875faf' , '' , 97 , '' , '' ] ,
|
2013-09-05 20:45:12 +00:00
|
|
|
\ }
|
2013-07-13 02:39:38 +00:00
|
|
|
|
2018-07-26 08:20:29 +00:00
|
|
|
" For commandline mode, we use the colors from normal mode, except the mode
|
2019-09-11 19:25:52 +00:00
|
|
|
" indicator should be colored differently, e.g. light green
|
|
|
|
let s:airline_a_commandline = [ '#0000ff' , '#0cff00' , 17 , 40 ]
|
2018-07-26 08:20:29 +00:00
|
|
|
let s:airline_b_commandline = [ '#ffffff' , '#444444' , 255 , 238 ]
|
|
|
|
let s:airline_c_commandline = [ '#9cffd3' , '#202020' , 85 , 234 ]
|
|
|
|
let g:airline#themes#dark#palette.commandline = airline#themes#generate_color_map(s:airline_a_commandline, s:airline_b_commandline, s:airline_c_commandline)
|
2013-08-06 23:29:06 +00:00
|
|
|
|
2013-10-06 13:22:33 +00:00
|
|
|
" 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.
|
2013-09-15 15:59:22 +00:00
|
|
|
let g:airline#themes#dark#palette.accents = {
|
|
|
|
\ 'red': [ '#ff0000' , '' , 160 , '' ]
|
|
|
|
\ }
|
|
|
|
|
|
|
|
|
2013-08-06 23:29:06 +00:00
|
|
|
" Here we define the color map for ctrlp. We check for the g:loaded_ctrlp
|
|
|
|
" variable so that related functionality is loaded iff the user is using
|
|
|
|
" ctrlp. Note that this is optional, and if you do not define ctrlp colors
|
|
|
|
" they will be chosen automatically from the existing palette.
|
2017-03-12 22:16:26 +00:00
|
|
|
if get(g:, 'loaded_ctrlp', 0)
|
|
|
|
let g:airline#themes#dark#palette.ctrlp = airline#extensions#ctrlp#generate_color_map(
|
|
|
|
\ [ '#d7d7ff' , '#5f00af' , 189 , 55 , '' ],
|
|
|
|
\ [ '#ffffff' , '#875fd7' , 231 , 98 , '' ],
|
|
|
|
\ [ '#5f00af' , '#ffffff' , 55 , 231 , 'bold' ])
|
2013-08-06 23:29:06 +00:00
|
|
|
endif
|