aboutsummaryrefslogtreecommitdiff
path: root/core/plugins.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-02-21 14:21:32 +0800
committerjdhao <jdhao@hotmail.com>2021-02-21 14:21:32 +0800
commit7085965e05f780a0436a788e91132a142e66a2a1 (patch)
treee695dc3ed86e3d1235389ea8eeb7de2f52488f60 /core/plugins.vim
parent2672a92e7740000490c80954bfa0bce4767ef5d4 (diff)
Refactor the auto-quit logic
Also quit quickfix window if it is the only window left.
Diffstat (limited to 'core/plugins.vim')
-rw-r--r--core/plugins.vim10
1 files changed, 1 insertions, 9 deletions
diff --git a/core/plugins.vim b/core/plugins.vim
index 9bba13d..99c934e 100644
--- a/core/plugins.vim
+++ b/core/plugins.vim
@@ -588,22 +588,14 @@ let g:vista_echo_cursor = 0
" Stay in current window when vista window is opened
let g:vista_stay_on_open = 0
-augroup matchup_conf
+augroup vista_conf
autocmd!
" Double mouse click to go to a tag
autocmd FileType vista* nnoremap <buffer> <silent>
\ <2-LeftMouse> :<C-U>call vista#cursor#FoldOrJump()<CR>
- " Quit Neovim if vista window is the only window
- autocmd BufEnter * call s:close_vista_win()
augroup END
nnoremap <silent> <Space>t :<C-U>Vista!!<CR>
-
-function! s:close_vista_win() abort
- if winnr('$') == 1 && getbufvar(bufnr(), '&filetype') ==# 'vista'
- quit
- endif
-endfunction
"}}
"{{ File editting