summaryrefslogtreecommitdiffstats
path: root/.config/nvim/init.vim
diff options
context:
space:
mode:
authorYigit Sever2021-04-04 16:28:26 +0300
committerYigit Sever2021-04-04 16:28:26 +0300
commit73d85ac48fc2ddf3b60ec3c265fcfe2f11f6d6f8 (patch)
tree7cfc6e686f386008ab4c5ef651544442691325b8 /.config/nvim/init.vim
parent6c3bf6eefea945fbb7f2115d7180766c49bfd5a9 (diff)
downloaddotfiles-73d85ac48fc2ddf3b60ec3c265fcfe2f11f6d6f8.tar.gz
dotfiles-73d85ac48fc2ddf3b60ec3c265fcfe2f11f6d6f8.tar.bz2
dotfiles-73d85ac48fc2ddf3b60ec3c265fcfe2f11f6d6f8.zip
vimrc: autocmd to quit when only qf left
Diffstat (limited to '.config/nvim/init.vim')
-rwxr-xr-x.config/nvim/init.vim3
1 files changed, 3 insertions, 0 deletions
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
161 161
162" Close vim if the only window left open is NERDTree 162" Close vim if the only window left open is NERDTree
163autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif 163autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
164" Close vim if the only window left open is a quickfix window
165autocmd WinEnter * if winnr("$") == 1 && &buftype == "quickfix" | q | endif
166" winnr("$") how many windows left?
164 167
165" Resize all windows proportionally when the terminal is resized 168" Resize all windows proportionally when the terminal is resized
166" let terminal resize scale the internal windows 169" let terminal resize scale the internal windows