Hi!
Since NERDTree has some serious issues with session management I want to give vimpanel a try. In NERDTree I used to have the following line in my vimrc to ensure that NERDTree is closed if the last buffer was closed:
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
Is there a way to achieve the same behaviour (or even a better one that automatically saves the session) with vimpanel?