forked from cocopon/iceberg.vim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-airline.vim
66 lines (55 loc) · 1.63 KB
/
template-airline.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
let s:save_cpo = &cpo
set cpo&vim
function! s:build_palette() abort
let col_base = {{col_base}}
let col_edge = {{col_edge}}
let col_error = {{col_error}}
let col_gradient = {{col_gradient}}
let col_nc = {{col_nc}}
let col_warning = {{col_warning}}
let col_insert = {{col_insert}}
let col_replace = {{col_replace}}
let col_visual = {{col_visual}}
let col_red = {{col_red}}
let p = {}
let p.inactive = airline#themes#generate_color_map(
\ col_nc,
\ col_nc,
\ col_nc)
let p.normal = airline#themes#generate_color_map(
\ col_edge,
\ col_gradient,
\ col_base)
let p.insert = airline#themes#generate_color_map(
\ col_insert,
\ col_gradient,
\ col_base)
let p.replace = airline#themes#generate_color_map(
\ col_replace,
\ col_gradient,
\ col_base)
let p.visual = airline#themes#generate_color_map(
\ col_visual,
\ col_gradient,
\ col_base)
" Accents
let p.accents = {
\ 'red': col_red,
\ }
" Error
let p.inactive.airline_error = col_error
let p.insert.airline_error = col_error
let p.normal.airline_error = col_error
let p.replace.airline_error = col_error
let p.visual.airline_error = col_error
" Warning
let p.inactive.airline_warning = col_warning
let p.insert.airline_warning = col_warning
let p.normal.airline_warning = col_warning
let p.replace.airline_warning = col_warning
let p.visual.airline_warning = col_warning
return p
endfunction
let g:airline#themes#iceberg#palette = s:build_palette()
let &cpo = s:save_cpo
unlet s:save_cpo