I recently added NERDTree and NERDTreeTabs to my vim configuration and I'm quite happy about it.
However, I wanted to configure it a bit further and have the following behavior:
Ctrl+Left:
If inside the NERDTree, do nothing.
If inside the edited file, go to the opened NERDTree, opening one first if none is present. I guess
NERDTreeTabsToggle
should be used, but to use it, I must be able to detect if a NERDTree is already open, not to close it by "toggling" it.
Ctrl+Right:
If inside the NERDTree, go back to the edited file without closing NERDTree. (Just like what Ctrl-w, Right would do.)
If inside the edited file, hide/close the NERDTree.
However, my Vim script skills are way to low for me to get any satisfying result. For instance, I can't figure out how to check what the current active window is or how to write the appropriate conditional statements.
Can someone help me with that ?
Thank you.