I'm trying to find a way to have a normal mode mapping that can toggle NERDTree, but when toggling on, tell NERDTree to find the current file.
I know about NERDTreeToggle
and NERDTreeFind
, and what I'm looking to do is essentially a combination of those two commands.
Here's my use case:
- When NERDTree is not open, I can hit
<C-\>
and NERDTree will open to the current file. - I can then hit
<C-\>
again and NERDTree will close.