mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-06 12:14:24 +08:00
implement customizable file name formatting (#230).
This commit is contained in:
@@ -305,8 +305,15 @@ virtualenv <https://github.com/jmcantrell/vim-virtualenv>
|
||||
* enable/disable displaying buffers with a single tab. >
|
||||
let g:airline#extensions#tabline#show_buffers = 1
|
||||
<
|
||||
* configure the formatting of filenames (see |filename-modifiers|). >
|
||||
let g:airline#extensions#tabline#fnamemod = ':p:.'
|
||||
* defines a function for how to format the file name. >
|
||||
" the default renders /foo/bar/file.txt => /f/b/file.txt
|
||||
let g:airline#extensions#tabline#fnamefunc
|
||||
|
||||
" here's a simple example to show only the file name:
|
||||
function! MyFileFormat(file)
|
||||
return fnamemodify(a:file, ':t')
|
||||
endfunction
|
||||
let g:airline#extensions#tabline#fnamefunc = 'MyFileFormat'
|
||||
<
|
||||
* configure filename match rules to exclude from the tabline. >
|
||||
let g:airline#extensions#tabline#excludes = []
|
||||
|
||||
Reference in New Issue
Block a user