From 73d85ac48fc2ddf3b60ec3c265fcfe2f11f6d6f8 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sun, 4 Apr 2021 16:28:26 +0300 Subject: vimrc: autocmd to quit when only qf left --- .config/nvim/init.vim | 3 +++ 1 file changed, 3 insertions(+) (limited to '.config/nvim') diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 8e4c33c..274c185 100755 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -161,6 +161,9 @@ autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif " Close vim if the only window left open is NERDTree autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif +" Close vim if the only window left open is a quickfix window +autocmd WinEnter * if winnr("$") == 1 && &buftype == "quickfix" | q | endif +" winnr("$") how many windows left? " Resize all windows proportionally when the terminal is resized " let terminal resize scale the internal windows -- cgit v1.2.3-70-g09d2