4

I'm using MiniBufExplorer and NERD tree to develop in Vim. I usually have the following screens:

MMMMMMMMMMMM
NNSSSSSSSSSS
NNSSSSSSSSSS
NNSSSSSSSSSS
NNSSSSSSSSSS
NNSSSSSSSSSS

where N is NERD tree, M is MiniBufExplorer and S is the file I'm looking at.

I sometimes forget to use :sh to get to a shell, and I hit :q on the S split, which makes it so toggling NERD tree will either make a full-screen NERD tree split or a full screen source view, but never where it was before where NERD tree was off to the left (MiniBufExplorer doesn't change).

How can I "reset" the splits to get the old behavior back after that? I've basically been doing :qa to completely exit Vim, but obviously that closes everything.

4

2 に答える 2

1

セッションを使用してみることができます-セットアップのセッションを作成します

mksession

そしてそれを復元します

source Session.vim

あなたの分割が台無しになった場合。

ただし、NERDTree が関係している場合は、session.vim プラグインを使用する必要があると考えてください: Vim, NERDtree not recovery in session restoreを参照してください。

于 2012-10-05T16:03:53.760 に答える
0

あなたの質問に対する直接的な回答ではありませんが、おそらくあなたの問題を解決する何か:

https://github.com/jistr/vim-nerdtree-tabs

「ファイルを閉じると、タブも一緒に閉じます。NERDTree がハングアップすることはありません。」

Nerdtreeは対処するのが最悪です。そのプラグインのためのプラグインは、それを耐えられるものにします。

于 2012-10-04T23:44:55.113 に答える