mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 14:49:06 +08:00
keep fmod as a valid configuration variable.
This commit is contained in:
parent
2e46190034
commit
22f1701a2e
|
@ -1,6 +1,7 @@
|
|||
" MIT License. Copyright (c) 2013 Bailey Ling.
|
||||
" vim: et ts=2 sts=2 sw=2
|
||||
|
||||
let s:fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':p:.')
|
||||
let s:buf_nr_format = get(g:, 'airline#extensions#tabline#buffer_nr_format', '%s: ')
|
||||
let s:buf_nr_show = get(g:, 'airline#extensions#tabline#buffer_nr_show', 0)
|
||||
let s:buf_modified_symbol = g:airline_symbols.modified
|
||||
|
@ -13,11 +14,10 @@ function! airline#extensions#tabline#formatters#default(bufnr, buffers)
|
|||
endif
|
||||
|
||||
let name = bufname(a:bufnr)
|
||||
let fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':p:.')
|
||||
if empty(name)
|
||||
let _ .= '[No Name]'
|
||||
else
|
||||
let _ .= substitute(fnamemodify(name, fmod), '\w\zs.\{-}\ze\/', '', 'g')
|
||||
let _ .= substitute(fnamemodify(name, s:fmod), '\w\zs.\{-}\ze\/', '', 'g')
|
||||
endif
|
||||
|
||||
if getbufvar(a:bufnr, '&modified') == 1
|
||||
|
|
|
@ -324,12 +324,17 @@ virtualenv <https://github.com/jmcantrell/vim-virtualenv>
|
|||
* configure whether buffer numbers should be shown. >
|
||||
let g:airline#extensions#tabline#buffer_nr_show = 0
|
||||
<
|
||||
Note: this is only valid when the formatter is 'default'.
|
||||
Note: this is only used by the 'default' formatter.
|
||||
|
||||
* configure how buffer numbers should be formatted with |printf|. >
|
||||
let g:airline#extensions#tabline#buffer_nr_format = '%s: '
|
||||
<
|
||||
Note: this is only valid when the formatter is 'default'.
|
||||
Note: this is only used by the 'default' formatter.
|
||||
|
||||
* configure the formatting of filenames (see |filename-modifiers|). >
|
||||
let g:airline#extensions#tabline#fnamemod = ':p:.'
|
||||
<
|
||||
Note: this is only used by the 'default' formatter.
|
||||
|
||||
* configure the minimum number of buffers needed to show the tabline. >
|
||||
let g:airline#extensions#tabline#buffer_min_count = 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user