Merge branch '256' into dev
This commit is contained in:
commit
ad96110eef
@ -15,7 +15,7 @@ function! airline#extensions#bufferline#init(ext)
|
|||||||
let g:bufferline_active_highlight = 'bufferline_selected'
|
let g:bufferline_active_highlight = 'bufferline_selected'
|
||||||
let g:bufferline_active_buffer_left = ''
|
let g:bufferline_active_buffer_left = ''
|
||||||
let g:bufferline_active_buffer_right = ''
|
let g:bufferline_active_buffer_right = ''
|
||||||
let g:bufferline_separator = ' '
|
let g:bufferline_separator = g:airline_symbols.space
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call airline#parts#define_raw('file', '%{bufferline#refresh_status()}'.bufferline#get_status_string())
|
call airline#parts#define_raw('file', '%{bufferline#refresh_status()}'.bufferline#get_status_string())
|
||||||
|
@ -39,7 +39,7 @@ function! airline#extensions#ctrlp#ctrlp_airline(...)
|
|||||||
let prv = '%#CtrlPlight# '.a:4.' %#Ctrlparrow1#'.g:airline_left_sep
|
let prv = '%#CtrlPlight# '.a:4.' %#Ctrlparrow1#'.g:airline_left_sep
|
||||||
let item = '%#CtrlPwhite# '.a:5.' %#CtrlParrow2#'.g:airline_left_sep
|
let item = '%#CtrlPwhite# '.a:5.' %#CtrlParrow2#'.g:airline_left_sep
|
||||||
let nxt = '%#CtrlPlight# '.a:6.' %#CtrlParrow3#'.g:airline_left_sep
|
let nxt = '%#CtrlPlight# '.a:6.' %#CtrlParrow3#'.g:airline_left_sep
|
||||||
let marked = '%#CtrlPdark# '.a:7.' '
|
let marked = '%#CtrlPdark# '.a:7.(g:airline_symbols.space)
|
||||||
let focus = '%=%<%#CtrlPdark# '.a:1.' %*'
|
let focus = '%=%<%#CtrlPdark# '.a:1.' %*'
|
||||||
let byfname = '%#CtrlParrow3#'.g:airline_right_alt_sep.'%#CtrlPdark# '.a:2.' %*'
|
let byfname = '%#CtrlParrow3#'.g:airline_right_alt_sep.'%#CtrlPdark# '.a:2.' %*'
|
||||||
let dir = '%#CtrlParrow3#'.g:airline_right_sep.'%#CtrlPlight# '.getcwd().' %*'
|
let dir = '%#CtrlParrow3#'.g:airline_right_sep.'%#CtrlPlight# '.getcwd().' %*'
|
||||||
|
@ -11,6 +11,7 @@ let s:layout = get(g:, 'airline#extensions#default#layout', [
|
|||||||
\ [ 'a', 'b', 'c' ],
|
\ [ 'a', 'b', 'c' ],
|
||||||
\ [ 'x', 'y', 'z', 'warning' ]
|
\ [ 'x', 'y', 'z', 'warning' ]
|
||||||
\ ])
|
\ ])
|
||||||
|
let s:spc = g:airline_symbols.space
|
||||||
|
|
||||||
function! s:get_section(winnr, key, ...)
|
function! s:get_section(winnr, key, ...)
|
||||||
if has_key(s:section_truncate_width, a:key)
|
if has_key(s:section_truncate_width, a:key)
|
||||||
@ -19,7 +20,7 @@ function! s:get_section(winnr, key, ...)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
|
let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
|
||||||
let [prefix, suffix] = [get(a:000, 0, '%( '), get(a:000, 1, ' %)')]
|
let [prefix, suffix] = [get(a:000, 0, '%('.s:spc), get(a:000, 1, s:spc.'%)')]
|
||||||
return empty(text) ? '' : prefix.text.suffix
|
return empty(text) ? '' : prefix.text.suffix
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -4,6 +4,10 @@
|
|||||||
" we don't actually want this loaded :P
|
" we don't actually want this loaded :P
|
||||||
finish
|
finish
|
||||||
|
|
||||||
|
" Due to some potential rendering issues, the use of the `space` variable is
|
||||||
|
" recommended.
|
||||||
|
let s:spc = g:airline_symbols.space
|
||||||
|
|
||||||
" Extension specific variables can be defined the usual fashion.
|
" Extension specific variables can be defined the usual fashion.
|
||||||
if !exists('g:airline#extensions#example#number_of_cats')
|
if !exists('g:airline#extensions#example#number_of_cats')
|
||||||
let g:airline#extensions#example#number_of_cats = 42
|
let g:airline#extensions#example#number_of_cats = 42
|
||||||
@ -35,7 +39,7 @@ function! airline#extensions#example#apply(...)
|
|||||||
let w:airline_section_c = get(w:, 'airline_section_c', g:airline_section_c)
|
let w:airline_section_c = get(w:, 'airline_section_c', g:airline_section_c)
|
||||||
|
|
||||||
" Then we just append this extenion to it, optionally using separators.
|
" Then we just append this extenion to it, optionally using separators.
|
||||||
let w:airline_section_c .= ' '.g:airline_left_alt_sep.' %{airline#extensions#example#get_cats()}'
|
let w:airline_section_c .= s:spc.g:airline_left_alt_sep.s:spc.'%{airline#extensions#example#get_cats()}'
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ endif
|
|||||||
function! airline#extensions#syntastic#get_warnings()
|
function! airline#extensions#syntastic#get_warnings()
|
||||||
let errors = SyntasticStatuslineFlag()
|
let errors = SyntasticStatuslineFlag()
|
||||||
if strlen(errors) > 0
|
if strlen(errors) > 0
|
||||||
return errors.' '
|
return errors.(g:airline_symbols.space)
|
||||||
endif
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -205,7 +205,7 @@ function! s:get_tabs()
|
|||||||
if s:tab_nr_type == 0
|
if s:tab_nr_type == 0
|
||||||
let val .= ' %{len(tabpagebuflist('.i.'))}'
|
let val .= ' %{len(tabpagebuflist('.i.'))}'
|
||||||
else
|
else
|
||||||
let val .= ' '.i
|
let val .= (g:airline_symbols.space).i
|
||||||
endif
|
endif
|
||||||
call b.add_section(group, val.'%'.i.'T %{airline#extensions#tabline#title('.i.')} %)')
|
call b.add_section(group, val.'%'.i.'T %{airline#extensions#tabline#title('.i.')} %)')
|
||||||
endfor
|
endfor
|
||||||
|
@ -6,13 +6,14 @@ if !exists(':TagbarToggle')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
let s:flags = get(g:, 'airline#extensions#tagbar#flags', '')
|
let s:flags = get(g:, 'airline#extensions#tagbar#flags', '')
|
||||||
|
let s:spc = g:airline_symbols.space
|
||||||
|
|
||||||
" Arguments: current, sort, fname
|
" Arguments: current, sort, fname
|
||||||
function! airline#extensions#tagbar#get_status(...)
|
function! airline#extensions#tagbar#get_status(...)
|
||||||
let builder = airline#builder#new({ 'active': a:1 })
|
let builder = airline#builder#new({ 'active': a:1 })
|
||||||
call builder.add_section('airline_a', ' Tagbar ')
|
call builder.add_section('airline_a', s:spc.'Tagbar'.s:spc)
|
||||||
call builder.add_section('airline_b', ' '.a:2.' ')
|
call builder.add_section('airline_b', s:spc.a:2.s:spc)
|
||||||
call builder.add_section('airline_c', ' '.a:3.' ')
|
call builder.add_section('airline_c', s:spc.a:3.s:spc)
|
||||||
return builder.build()
|
return builder.build()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -5,13 +5,16 @@ if !get(g:, 'virtualenv_loaded', 0)
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let s:spc = g:airline_symbols.space
|
||||||
|
|
||||||
function! airline#extensions#virtualenv#init(ext)
|
function! airline#extensions#virtualenv#init(ext)
|
||||||
call a:ext.add_statusline_func('airline#extensions#virtualenv#apply')
|
call a:ext.add_statusline_func('airline#extensions#virtualenv#apply')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#virtualenv#apply(...)
|
function! airline#extensions#virtualenv#apply(...)
|
||||||
if &filetype =~ "python"
|
if &filetype =~ "python"
|
||||||
call airline#extensions#append_to_section('x', ' '.g:airline_right_alt_sep.' %{virtualenv#statusline()}')
|
call airline#extensions#append_to_section('x',
|
||||||
|
\ s:spc.g:airline_right_alt_sep.s:spc.'%{virtualenv#statusline()}')
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -41,11 +41,11 @@ function! airline#extensions#whitespace#check()
|
|||||||
let b:airline_whitespace_check = s:symbol
|
let b:airline_whitespace_check = s:symbol
|
||||||
if s:show_message
|
if s:show_message
|
||||||
if trailing != 0
|
if trailing != 0
|
||||||
let b:airline_whitespace_check .= ' '.printf(s:trailing_format, trailing)
|
let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:trailing_format, trailing)
|
||||||
endif
|
endif
|
||||||
if mixed
|
if mixed
|
||||||
let mixnr = indents[0] == indents[1] ? indents[0] : indents[2]
|
let mixnr = indents[0] == indents[1] ? indents[0] : indents[2]
|
||||||
let b:airline_whitespace_check .= ' '.printf(s:mixed_indent_format, mixnr)
|
let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:mixed_indent_format, mixnr)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user