:q only closes the current window. If you are using tabs or split windows, you need to do :q for all of them. Also, plugins like NERDTree and MiniBufExpl have their own windows, which need to be closed individually.
Is there a command to quit all these open windows and quit Vim in a single stroke? However, if there is some buffer or window with unsaved changes, I should be asked to save it or not. Any command to achieve this?
I hope this is not a strange request, because this is how most non-Vim editors with tab or splits work.
You can quit all loaded and open buffers, splits and tabs with:
If you want to quit without saving:
You could assign a mapping to do this with a single stroke, this assigns the comma to quit everything without prompting to save:
:wqallwrites before closing, that might be useful.Type
:he :qain vim for more info