title: How-to customize NERDTree behavior
body: <p>I recently added NERDTree and NERDTreeTabs to my vim configuration and I'm quite happy about it.</p>
  
  <p>However, I wanted to configure it a bit further and have the following behavior:</p>
  
  <p><kbd>Ctrl</kbd>+<kbd>Left</kbd>:</p>
  
  <ul>
  <li><p>If inside the NERDTree, do nothing.</p></li>
  <li><p>If inside the edited file, go to the opened NERDTree, opening one first if none is present. I guess <code>NERDTreeTabsToggle</code> 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.</p></li>
  </ul>
  
  <p><kbd>Ctrl</kbd>+<kbd>Right</kbd>:</p>
  
  <ul>
  <li><p>If inside the NERDTree, go back to the edited file without closing NERDTree. (Just like what <kbd>Ctrl</kbd>-<kbd>w</kbd>, <kbd>Right</kbd> would do.)</p></li>
  <li><p>If inside the edited file, hide/close the NERDTree.</p></li>
  </ul>
  
  <p>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.</p>
  
  <p>Can someone help me with that ?</p>
  
  <p>Thank you.</p>