mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-26 02:09:48 +08:00
miscellaneous minor changes
This commit is contained in:
parent
6e515a4627
commit
c017c9fbb3
|
@ -21,8 +21,8 @@ function! airline#exec_highlight(group, colors)
|
|||
endfunction
|
||||
|
||||
function! airline#reload_highlight()
|
||||
call airline#highlight(['inactive'])
|
||||
call airline#highlight(['normal'])
|
||||
call s:highlight(['inactive'])
|
||||
call s:highlight(['normal'])
|
||||
call airline#extensions#load_theme()
|
||||
endfunction
|
||||
|
||||
|
@ -32,10 +32,10 @@ function! airline#load_theme(name)
|
|||
let w:airline_lastmode = ''
|
||||
call airline#update_statusline()
|
||||
call airline#reload_highlight()
|
||||
call airline#update_highlight()
|
||||
call airline#check_mode()
|
||||
endfunction
|
||||
|
||||
function! airline#highlight(modes)
|
||||
function! s:highlight(modes)
|
||||
" draw the base mode, followed by any overrides
|
||||
let mapped = map(a:modes, 'v:val == a:modes[0] ? v:val : a:modes[0]."_".v:val')
|
||||
for mode in mapped
|
||||
|
@ -108,7 +108,7 @@ function! airline#update_statusline()
|
|||
call setwinvar(winnr(), '&statusline', airline#get_statusline(winnr(), 1))
|
||||
endfunction
|
||||
|
||||
function! airline#update_highlight()
|
||||
function! airline#check_mode()
|
||||
if get(w:, 'airline_active', 1)
|
||||
let l:m = mode()
|
||||
if l:m ==# "i"
|
||||
|
@ -131,7 +131,7 @@ function! airline#update_highlight()
|
|||
|
||||
let mode_string = join(l:mode)
|
||||
if get(w:, 'airline_lastmode', '') != mode_string
|
||||
call airline#highlight(l:mode)
|
||||
call s:highlight(l:mode)
|
||||
let w:airline_lastmode = mode_string
|
||||
endif
|
||||
return ''
|
||||
|
|
|
@ -29,7 +29,7 @@ function! airline#builder#new(active)
|
|||
endfunction
|
||||
|
||||
function! builder.build()
|
||||
let line = '%{airline#update_highlight()}'
|
||||
let line = '%{airline#check_mode()}'
|
||||
let side = 0
|
||||
let prev_group = ''
|
||||
let separator_groups = []
|
||||
|
|
|
@ -18,7 +18,7 @@ endfunction
|
|||
|
||||
function! airline#extensions#bufferline#init(ext)
|
||||
highlight AlBl_active gui=bold cterm=bold term=bold
|
||||
highlight link AlBl_inactive Al6
|
||||
highlight link AlBl_inactive airline_c
|
||||
let g:bufferline_inactive_highlight = 'AlBl_inactive'
|
||||
let g:bufferline_active_highlight = 'AlBl_active'
|
||||
let g:bufferline_active_buffer_left = ''
|
||||
|
|
|
@ -5,7 +5,7 @@ if !exists('g:airline#extensions#csv#column_display')
|
|||
let g:airline#extensions#csv#column_display = 'Number'
|
||||
endif
|
||||
|
||||
function! airline#extensions#csv#get_statusline()
|
||||
function! airline#extensions#csv#get_column()
|
||||
if exists('*CSV_WCol')
|
||||
if g:airline#extensions#csv#column_display ==# 'Name'
|
||||
return '['.CSV_WCol('Name').CSV_WCol().']'
|
||||
|
@ -23,7 +23,7 @@ function! airline#extensions#csv#apply()
|
|||
endif
|
||||
let w:airline_section_gutter =
|
||||
\ g:airline_left_alt_sep
|
||||
\ .' %{airline#extensions#csv#get_statusline()}'
|
||||
\ .' %{airline#extensions#csv#get_column()}'
|
||||
\ .w:airline_section_gutter
|
||||
endif
|
||||
endfunction
|
||||
|
|
|
@ -46,7 +46,7 @@ call s:check_defined('g:airline_mode_map', {
|
|||
\ 'R' : 'REPLACE',
|
||||
\ 'v' : 'VISUAL',
|
||||
\ 'V' : 'V-LINE',
|
||||
\ 'c' : 'CMD ',
|
||||
\ 'c' : 'COMMAND',
|
||||
\ '' : 'V-BLOCK',
|
||||
\ 's' : 'SELECT',
|
||||
\ 'S' : 'S-LINE',
|
||||
|
|
Loading…
Reference in New Issue
Block a user