diff --git a/plugins.vim b/plugins.vim index d81a5f6..f6fd35e 100644 --- a/plugins.vim +++ b/plugins.vim @@ -522,6 +522,17 @@ let g:vista_echo_cursor = 0 let g:vista_stay_on_open = 0 nnoremap t :Vista!! + +function! s:close_vista_win() abort + if winnr('$') == 1 && getbufvar(bufnr(), '&filetype') ==# 'vista' + quit + endif +endfunction + +augroup vista_close_win + autocmd! + autocmd BufEnter * call s:close_vista_win() +augroup END "}} "{{ File editting