carlhuda / janus

Vim distribution
7.88k stars 814 forks source link

Cannot reproduce NERDTree setting #657

Closed vladimiroltean closed 8 years ago

vladimiroltean commented 8 years ago

Hello, I am trying to reproduce a custom configuration of yours for a non-Janus setup. Specifically, this behavior: "When opening vim with vim /path, open the left NERDTree to that directory, set the vim pwd, and clear the right buffer" I have traced the behavior to occur based on code from this file. However, when I copy the autocmd's and s:CdIfDirectory() function in my own vimrc, I do not get the expected behavior. I have added some debug messages and here is what happens in my case:

[user@localhost ~] $ vim /
:messages
a:directory is  /home/user/NERD_tree_1
directory is  0
explicitDirectory is  0

As you can see, in my setup the autocmd seems to trigger with a wrong path. What could cause this?

vladimiroltean commented 8 years ago

Solved. Needed this option as well. let NERDTreeHijackNetrw = 0