Merge pull request #884 from yousong/dconf
init.vim: use %F in section_c if autochdir is set.
This commit is contained in:
commit
4791dcac02
@ -79,6 +79,7 @@ function! airline#init#bootstrap()
|
|||||||
\ 'accent': 'red',
|
\ 'accent': 'red',
|
||||||
\ })
|
\ })
|
||||||
call airline#parts#define_raw('file', '%f%m')
|
call airline#parts#define_raw('file', '%f%m')
|
||||||
|
call airline#parts#define_raw('path', '%F%m')
|
||||||
call airline#parts#define_raw('linenr', '%{g:airline_symbols.linenr}%#__accent_bold#%4l%#__restore__#')
|
call airline#parts#define_raw('linenr', '%{g:airline_symbols.linenr}%#__accent_bold#%4l%#__restore__#')
|
||||||
call airline#parts#define_function('ffenc', 'airline#parts#ffenc')
|
call airline#parts#define_function('ffenc', 'airline#parts#ffenc')
|
||||||
call airline#parts#define_empty(['hunks', 'branch', 'tagbar', 'syntastic', 'eclim', 'whitespace','windowswap'])
|
call airline#parts#define_empty(['hunks', 'branch', 'tagbar', 'syntastic', 'eclim', 'whitespace','windowswap'])
|
||||||
@ -96,7 +97,11 @@ function! airline#init#sections()
|
|||||||
let g:airline_section_b = airline#section#create(['hunks', 'branch'])
|
let g:airline_section_b = airline#section#create(['hunks', 'branch'])
|
||||||
endif
|
endif
|
||||||
if !exists('g:airline_section_c')
|
if !exists('g:airline_section_c')
|
||||||
let g:airline_section_c = airline#section#create(['%<', 'file', spc, 'readonly'])
|
if &autochdir == 1
|
||||||
|
let g:airline_section_c = airline#section#create(['%<', 'path', spc, 'readonly'])
|
||||||
|
else
|
||||||
|
let g:airline_section_c = airline#section#create(['%<', 'file', spc, 'readonly'])
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
if !exists('g:airline_section_gutter')
|
if !exists('g:airline_section_gutter')
|
||||||
let g:airline_section_gutter = airline#section#create(['%='])
|
let g:airline_section_gutter = airline#section#create(['%='])
|
||||||
|
Loading…
Reference in New Issue
Block a user