Skip to content

Commit

Permalink
Merge pull request chxuan#53 from if2012/mr
Browse files Browse the repository at this point in the history
关闭最后一个文件编辑buffer窗口时自动退出其余窗口
  • Loading branch information
chxuan authored Aug 17, 2018
2 parents 6e84e8f + 0c805a3 commit 2238cf2
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 @@ -181,6 +181,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 2238cf2

Please sign in to comment.