Description
Self-Diagnosis
- I have searched the issues for an answer to my question.
- I have reviewed the NERDTree documentation.
:h NERDTree
- I have reviewed the Wiki.
- I have searched the web for an answer to my question.
Environment (for bug reports)
- Operating System:
Debian Buster
- Vim/
Neovimversion:echo v:version
:802
- NERDTree version, found on 1st line in NERDTree quickhelp
?
:6.8.0
- vimrc settings
- NERDTree variables
let g:NERDTreeWinSize = 31
- Other NERDTree-dependent Plugins
- jistr/vim-nerdtree-tabs
- ryanoasis/vim-devicons
- tiagofumo/vim-nerdtree-syntax-highlight
- Xuyuanp/nerdtree-git-plugin
- Others (specify):
-
I've verified the issue occurs with only NERDTree installed.[This issue occurs frequently when using tabs in the way that is supported by vim-airline. This might not be the traditional way to use tabs, but I think it is worth reporting.]
Steps to Reproduce the Issue
-
Switch to another open file.
- Toggle open NERDTree which open on the left, using maximum width, leaving buffer that was open only a single column of text on right.
Current Result (Include screenshots where appropriate.)
See the last screenshot above. The NERDTree buffer is open on the left but is using maximum width leaving only one column of text space on the right for the buffer that was open. I believe this logically makes sense because the NERDTree window changed size to the full width in step 4 when the buffer next to NERDTree was closed.
Expected Result
I expected NERDTree to retain its configured size when it is reopened, but I can also see a very valid expectation that the window retains its width whenever it is changed, so I'm not sure there's a clear direction.
I have managed to work around this for my workflow using: https://github.com/leighmcculloch/vim_dotfiles/blob/master/vimrc#L135
When I open NERDTree with NERDTreeFind
, I call vertical resize 31
immediately afterwards. It fixes the issue for me resulting in step 6 from above looking like this:
This issue may be related to #142 which was closed without much information or resolution. As my issue is more specific I've opened a new issue.