Declan McGrath
Declan McGrath

Reputation: 784

Is it possible to stop the NERDTree window resizing when using Ctrl W Equals to make all split window equally sized in Vim?

Usually NERDTree doesn't get resized when I do this. But when I am working with a bunch of horizontal and vertical splits for a while, it can happen.

I don't know what the change in state of within the instance of Vim is that makes this issue happen during a vim session. I'm not sure if the number of splits makes a difference.

Usually I set up 4 splits, along with the NERDTree window on the left like this...

|--|-----|-----|
|  |     |     |
|NT|-----|-----|
|  |     |     |
|--|-----|-----|

When I do the equal split resize I end up with this when things go wrong...

|-----|-----|-----|
|     |     |     |
|  NT |-----|-----|
|     |     |     |
|-----|-----|-----|

That's not the end of the world. The real problem is when I close a couple of splits it ends up like this...

|--------|--------|
|        |        |
|   NT   |--------|
|        |        |
|--------|--------|

... which is just silly and I have to exit Vim and start over.

I use Ctrl-w followed by = to carry out the equal resizing of vim splits.

Upvotes: 0

Views: 504

Answers (1)

Declan McGrath
Declan McGrath

Reputation: 784

I think this is a bug, perhaps in NERDTree. There is a "change of state" that causes this problem to start happening. It is when you do a Ctrl-w followed by 'o' to maximize one of the splits. I've reported this as an issue in the NERDTree github project at https://github.com/scrooloose/nerdtree/issues/644

Upvotes: 1

Related Questions