Vim, NERDtree not recovered in session restore

前端 未结 6 1100
没有蜡笔的小新
没有蜡笔的小新 2021-01-30 17:49

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

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-30 18:09

    To fix the NERDTress session with session plugin, the new session commands embedded in session plugin: "SaveSession" and "OpenSession" should be used, instead of "mksession" and "source".

    According to the session plugin author's comments: Vim’s :mksession command isn’t really compatible with plug-ins that create buffers with generated content and because of this session.vim includes specific workarounds for such plug-ins: •BufExplorer, Project and NERD tree windows are supported; •When shell.vim is installed Vim’s full-screen state is persisted; •The netrw and taglist.vim plug-ins support sessions out of the box.

    Maybe it is why we should use the new commands to overcome NERDTree session issue.

    For more details, please refer to http://peterodding.com/code/vim/session/.

提交回复
热议问题