How do I reset partitions in Vim?

I use MiniBufExplorer and the NERD tree to develop in Wim. I usually have the following screens:

MMMMMMMMMMMM NNSSSSSSSSSS NNSSSSSSSSSS NNSSSSSSSSSS NNSSSSSSSSSS NNSSSSSSSSSS 

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

I sometimes forget to use :sh to access the shell, and I press :q to S split, which forces it to switch the NERD tree, either to create a full-screen partition of the NERD tree, or full but never been where it was before, when the NERD tree was on the left (MiniBufExplorer does not change).

How can I β€œreset” the split to restore the previous behavior? I basically did :qa to completely exit Vim, but obviously this closes everything.

+4
source share
2 answers

You can try using sessions - create a session of your installation with

 mksession 

and restore it using

 source Session.vim 

if your splits are reset.

Think you need to use the session.vim plugin, although if NERDTree is involved: see Vim, NERDtree is not restored in session recovery .

+1
source

not a direct answer to your question, but maybe something that will solve your problem:

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

"When you close the file, the tab closes with it. NERDTree does not hang open."

Nerdtree is the worst thing to deal with. This plugin for the plugin makes it acceptable.

0
source

Source: https://habr.com/ru/post/1437865/


All Articles