Reputation: 716
When I press "o" on any file in NerdTree list, it opens this file in one of currently opened tabs. Sometimes, when I'm not 100% sure what file to open, I have to do this:
1) o (open file)
2) ctrl-ww (switch back to nerdtree)
3) j or k (go to next file) repeat 1-3 many times
I want to be able to press Alt-o to open file and switch back to NerdTree. I tried this:
map <M-o> o<C-w>w
map <M-o> oC-ww
and both didn't work. What is wrong and how can I fix my mapping?
Upvotes: 2
Views: 530
Reputation: 172540
This is built into the plugin; the go
command does this:
go Open selected file, but leave cursor in the NERDTree
Upvotes: 3