NERDTree does not open in the directory from which macvim was opened

I recently upgraded my macvim to 7.3, and I can no longer open nerdtree or the network in the directory in which macvim was opened, it always opens in my home directory.

For instance,

If I open macvim in the / users / me / test / project directory, I want the root NERDTree to be / Users / me / test / project, and not / Users / me.

Any ideas?

+3
source share
4 answers

I did it

(all changes in .vimrc)

  • NERDTree is enabled by default.

    autocmd VimEnter * NERDTree
    
  • Put this script I got from github in .vimrc. This will make the vim AND NERDTree buffer exit with:q

  • Say your project folder is / home / user / my -project, and then do the following:

    mvim /home/user/my-project/README
    

    NERDTree .

+1

, , NERDTree, ( .vimrc):

map <silent> <F1> :NERDTreeToggle %:p:h<CR>

F1 (/) NERDTree . , Macvim.

+2
+2

( ) ​​ 55, .

0

Source: https://habr.com/ru/post/1761361/


All Articles