mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-16 00:37:08 +08:00
[add] short_path formatter in section_c
[update] test
This commit is contained in:
8
autoload/airline/formatter/short_path.vim
Normal file
8
autoload/airline/formatter/short_path.vim
Normal file
@@ -0,0 +1,8 @@
|
||||
scriptencoding utf-8
|
||||
|
||||
function! airline#formatter#short_path#format(val) abort
|
||||
if get(g:, 'airline_stl_path_style', 'default') ==# 'short'
|
||||
return '%{pathshorten(expand("'.a:val.'"))}%'
|
||||
endif
|
||||
return a:val
|
||||
endfunction
|
||||
Reference in New Issue
Block a user