You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
winnr("$") == 1 This checks if there is only one window active bufwinnr("vimpanel-") > 0 Checks if the buffer name starts with vimpanel- len(filter(range(1, bufnr('$')), 'buflisted(v:val)')) == 1 Counts the number of active buffers
However I see several problems with this:
it doesn't allow you to open a panel without having any other buffers in vim
it doesn't work with multiple panels, something that is supported by vimpanel but not NERDTree
So I would honestly not use this command. Instead you can just quit vimpanel as you do with any other buffer. This is easier compared with NERDTree because NERDTree uses a hidden buffer making things more complicated.
Regarding sessions, there is a VimpanelSessionMake command which allows you to save the session. It's a wrapper around the built-in mksession but also saves the layout of the panel (or panels, since you can have more than one with vimpanel).
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:
Is there a way to achieve the same behaviour (or even a better one that automatically saves the session) with vimpanel?
The text was updated successfully, but these errors were encountered: