mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-12-31 00:24:22 +08:00
extensions: Allow customization of filetypes
Define the variable :let g:airline_filetype_overrides to allow for
specific customization how a specific filetype will be displayed.
For e.g. a German display, you can use: >
:let g:airline_filetype_overrides = {'help': ['Hilfe', ':%f']}
<
This defines how section a and b will look like for a window with that
specific filetype.
Closes #1888
This commit is contained in:
@@ -203,12 +203,27 @@ values):
|
||||
statusline modified >
|
||||
let g:airline_exclude_filetypes = [] " see source for current list
|
||||
<
|
||||
* define the set of names to be displayed instead of a specific filetypes (for
|
||||
section a and b): >
|
||||
|
||||
let g:airline_filetype_overrides = {
|
||||
\ 'defx': ['defx', '%{b:defx.paths[0]}'],
|
||||
\ 'gundo': [ 'Gundo', '' ],
|
||||
\ 'help': [ 'Help', '%f' ],
|
||||
\ 'minibufexpl': [ 'MiniBufExplorer', '' ],
|
||||
\ 'nerdtree': [ get(g:, 'NERDTreeStatusline', 'NERD'), '' ],
|
||||
\ 'startify': [ 'startify', '' ],
|
||||
\ 'vim-plug': [ 'Plugins', '' ],
|
||||
\ 'vimfiler': [ 'vimfiler', '%{vimfiler#get_status_string()}' ],
|
||||
\ 'vimshell': ['vimshell','%{vimshell#get_status_string()}'],
|
||||
\ }
|
||||
<
|
||||
* defines whether the preview window should be excluded from have its window
|
||||
statusline modified (may help with plugins which use the preview window
|
||||
heavily) >
|
||||
let g:airline_exclude_preview = 0
|
||||
<
|
||||
* disable the Airline customization for selective windows (this is a
|
||||
* disable the Airline customization for selected windows (this is a
|
||||
window-local variable so you can disable it per-window) >
|
||||
let w:airline_disabled = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user