This is simillar to this question , but I'm not using NERDTree , instead netrw for same purpose. I have tried tweaking the script in my .vimrc a little bit , but I have no idea what do netrw buffers are named as.
With NERDTree this went well , but having tough luck with netrw.
aug netrw_close
au!
au WinEnter * if winnr('$') == 1 && getbufvar(winbufnr(winnr()), "&filetype") == "netrw"|q|endif
aug END
Warnings
Netrw can easily be the only open window. This would mean your Vim instance would close unexpectedly. It would be better to learn how to use :qa if you want to close all the windows.
This is simillar to this question , but I'm not using NERDTree , instead netrw for same purpose. I have tried tweaking the script in my .vimrc a little bit , but I have no idea what do netrw buffers are named as.
With NERDTree this went well , but having tough luck with netrw.
Thanks :)
Add to your
.vimrc
fileWarnings
Netrw can easily be the only open window. This would mean your Vim instance would close unexpectedly. It would be better to learn how to use
:qa
if you want to close all the windows.