mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-27 05:34:35 +00:00
Disable airline in nerdtree
This commit is contained in:
parent
36fe6799d7
commit
57ee2783eb
|
@ -11,3 +11,14 @@ if empty($DISPLAY) " Use ASCII-only if we're in TTY
|
||||||
let g:airline_symbols_ascii = 1
|
let g:airline_symbols_ascii = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Disable airline in nerdtree buffer
|
||||||
|
augroup filetype_nerdtree
|
||||||
|
au!
|
||||||
|
au FileType nerdtree call s:disable_airline_on_nerdtree()
|
||||||
|
au WinEnter,BufWinEnter,TabEnter * call s:disable_airline_on_nerdtree()
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
fu s:disable_airline_on_nerdtree() abort
|
||||||
|
let nerdtree_winnr = index(map(range(1, winnr('$')), {_,v -> getbufvar(winbufnr(v), '&ft')}), 'nerdtree') + 1
|
||||||
|
call timer_start(0, {-> nerdtree_winnr && setwinvar(nerdtree_winnr, '&stl', '%#Normal#')})
|
||||||
|
endfu
|
||||||
|
|
Loading…
Reference in a new issue