When I have a NERDtree panel and I save a Vim session (mksession [filename]), then open the session (vim -S filename), the panel is opened and tagged \"NERDtree\" but is not pop
The easiest way to make NERDTree act as expected with sessions is probably to patch NERD_tree.vim, adding an autocommand to the NERDTree autocommand group (right after the augroup NERDTree
line):
exec "autocmd BufEnter ". s:NERDTreeBufName ."* call initNerdTreeInPlace(\"\")"
It's not extensively tested, but this seems to work for me with several layouts and with different numbers of NERDTree windows open.
Edit: Actually, this doesn't work so great because NERDTree has primary and secondary windows, and there's no indication in the session file whether a NERDTree buffer is one or the other. It looks like adding reliable support for this to the plugin wouldn't be that big a challenge, but it's more than trivial. In the meantime, for simple cases, adding the following autocommand (instead of the one above) might do what you want:
exec "autocmd BufEnter ". s:NERDTreeBufName ."* :NERDTreeToggle | :NERDTreeToggle"