diff options
author | Yigit Sever | 2021-04-04 16:28:26 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-04 16:28:26 +0300 |
commit | 73d85ac48fc2ddf3b60ec3c265fcfe2f11f6d6f8 (patch) | |
tree | 7cfc6e686f386008ab4c5ef651544442691325b8 /.config/nvim/init.vim | |
parent | 6c3bf6eefea945fbb7f2115d7180766c49bfd5a9 (diff) | |
download | dotfiles-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.vim | 3 |
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 |
163 | autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | 163 | autocmd 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 | ||
165 | autocmd 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 |