2
votes

I've been using MacVim and the Janus distribution for a while and have become very used to how it works. Recently, when I execute "mvim ." from a directory in a Terminal window, I get a MacVim window with only NERDTree open, there's not a vertical split. If I select a file in NERDTree, it replaces the NERDTree window with that file contents instead of leaving NERDTree open in a left pane.

Does anyone know how to get this back to the default configuration?

2
Are you sure that this behaviour changed over time? I think that's the default behaviour of vim. Try :e / for example, it should open your root file directory in the current window. - evnu

2 Answers

0
votes

I use this command to open NerdTree with Vim editor and it works

autocmd VimEnter * NERDTree
0
votes

You can add this to your .vimrc autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists(“s:std_in”) | NERDTree | endif And Nerdtree will be open in a vertical split when you run mvim (not mvim .)

You can find some other improvements to your nerdtree config here: https://medium.com/@victormours/a-better-nerdtree-setup-3d3921abc0b9#.nlz8ycchu