From 0c805a32abae349aa6544c49bd6ef42f049e4956 Mon Sep 17 00:00:00 2001 From: if2012 <735688270@qq.com> Date: Fri, 29 Jun 2018 17:11:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E6=96=87=E4=BB=B6=E7=BC=96=E8=BE=91buffer=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=97=B6=E8=87=AA=E5=8A=A8=E9=80=80=E5=87=BA=E5=85=B6?= =?UTF-8?q?=E4=BD=99=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vimrc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.vimrc b/.vimrc index 9b31ab5c..e69cad40 100644 --- a/.vimrc +++ b/.vimrc @@ -164,6 +164,10 @@ nnoremap l " 打开文件自动定位到最后编辑的位置 autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | execute "normal! g'\"" | endif + +" vim关闭最后一个文件编辑buffer窗口时自动退出其余所有NERDTree、tagbar、Quickfix窗口 +autocmd BufEnter * if 0 == len(filter(range(1, winnr('$')), 'empty(getbufvar(winbufnr(v:val), "&bt"))')) | qa! | endif + " 主题 set background=dark let g:onedark_termcolors=256