Skip to content

Commit

Permalink
关闭最后一个文件编辑buffer窗口时自动退出其余窗口
Browse files Browse the repository at this point in the history
  • Loading branch information
kkyf09 committed Jun 29, 2018
1 parent 89b1d33 commit 0c805a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ nnoremap <c-l> <c-w>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
Expand Down

0 comments on commit 0c805a3

Please sign in to comment.