From 96113ed476ec336374d5e5a74c9d0adbce4ff739 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sun, 11 Oct 2020 18:28:10 +0800 Subject: [PATCH] update vista.vim config --- plugins.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) 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