[add] g:airline_section_c_only_filename

This commit is contained in:
kazukazuinaina 2021-04-23 02:17:39 +09:00
parent 07ab201a27
commit 9b2c1e9915
2 changed files with 8 additions and 1 deletions

View File

@ -145,7 +145,11 @@ function! airline#init#bootstrap()
\ 'function': 'airline#parts#readonly',
\ 'accent': 'red',
\ })
call airline#parts#define_raw('file', airline#formatter#short_path#format('%f%m'))
if get(g:, 'airline_section_c_only_filename',0)
call airline#parts#define_raw('file', '%t%m')
else
call airline#parts#define_raw('file', airline#formatter#short_path#format('%f%m'))
endif
call airline#parts#define_raw('path', '%F%m')
call airline#parts#define('linenr', {
\ 'raw': '%{g:airline_symbols.linenr}%l',

View File

@ -296,6 +296,9 @@ values):
* Display a short path in statusline: >
let g:airline_stl_path_style = 'short'
>
* Display a only file name in statusline: >
let g:airline_section_c_only_filename = 1
>
=============================================================================
COMMANDS *airline-commands*