-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathairline.vim
103 lines (95 loc) · 3.2 KB
/
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
"let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
"
"
"
"" unicode symbols
"let g:airline_left_sep = '»'
"let g:airline_left_sep = '▶'
"let g:airline_right_sep = '«'
"let g:airline_right_sep = '◀'
"let g:airline_symbols.crypt = '🔏'
"let g:airline_symbols.linenr = '␊'
"let g:airline_symbols.linenr = ''
"let g:airline_symbols.linenr = '¶'
"let g:airline_symbols.maxlinenr = '☰'
"let g:airline_symbols.maxlinenr = ''
"let g:airline_symbols.branch = '⎇'
"let g:airline_symbols.paste = 'ρ'
"let g:airline_symbols.paste = 'Þ'
"let g:airline_symbols.paste = '∥'
"let g:airline_symbols.spell = 'Ꞩ'
"let g:airline_symbols.notexists = '∄'
let g:airline_symbols.whitespace = 'Ξ'
"
"" powerline symbols
let g:airline_left_sep = ''
"let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
"let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = '⎇ '
let g:airline_symbols.readonly = '🔏'
let g:airline_symbols.linenr = ''
"
"
"""let g:airline_left_sep = ''
""let g:airline_left_sep = ''
"let g:airline_left_alt_sep = ''
"""let g:airline_right_sep = ''
""let g:airline_right_sep = ''
"let g:airline_right_alt_sep = ''
"""let g:airline_symbols.branch = ''
"""let g:airline_symbols.readonly = ''
"""let g:airline_symbols.linenr = ''
"let g:airline_detect_modified = 0 "if you're sticking the + in section_c you probably want to disable detection
"function! Init()
" call airline#parts#define_raw('modified', '%{&modified ? "*" : ""}')
" call airline#parts#define_accent('modified', 'red')
" let g:airline_section_c = airline#section#create(['%f', 'modified'])
"endfunction
"autocmd VimEnter * call Init()
let g:airline_mode_map = {
\ 'n' : '📄',
\ 'i' : '📝 ',
\ 'R' : '',
\ 'v' : ' ',
\ 'V' : '' ,
\ "\<C-v>": '',
\ 'c' : '',
\ 's' : '',
\ 'S' : 'SL',
\ "\<C-s>": 'SB',
\ 't': '',
\ '^t': '',
\ '^T': '',
\ 'C-T': '',
\ '<C-t>': '',
\ '<C-T>': '',
\ 'TERMINAL': '',
\ }
"* enable/disable coc integration >
let g:airline#extensions#coc#enabled = 1
"* change error symbol: >
let airline#extensions#coc#error_symbol = '🛑 '
""<
""change warning symbol: >
let airline#extensions#coc#warning_symbol = '🟠'
""<
""* change error format: >
let airline#extensions#coc#stl_format_err = '%E{[%e(#%fe)]}'
""<
""* change warning format: >
let airline#extensions#coc#stl_format_warn = '%W{[%w(#%fw)]}'
"%p%% %#__accent_bold#%{g:airline_symbols.linenr}:%l%#__restore__#%#__accent_bold#/%L%{g:airline_symbols.maxlinenr} %#__restore__#%#__accent_bold# %{g:airline_symbols.colnr}:%v%#__restore__#
"au User AirlineAfterInit :let g:airline_section_z = airline#section#create(['%3p%% %L:%3v'])
au User AirlineAfterInit :let g:airline_section_z = airline#section#create(['%{g:airline_symbols.linenr}:%l%#__restore__#%#__accent_bold#:%c%'])
function! s:update_git_status()
let g:airline_section_b = "%{get(g:,'coc_git_status','')}"
endfunction
let g:airline_section_b = "%{get(g:,'coc_git_status','')}"
autocmd User CocGitStatusChange call s:update_git_status()