Question

I want to be able to open nerdtree in new window (buffer if you wish) so that it is not in split with the current edited file. The same happens when I open vim from command line with a directory specified as an argument.

Was it helpful?

Solution

You can achieve that with this combination:

:NERDTree | only

OTHER TIPS

"Split" is usually synonymous with "window" and both are not the same as "buffer".

Remove NERDTree from your config, what you want is the normal behavior of the built-in netrw. See :help netrw.

:Ex     " open a listing of the current directory in the current window
:Sex    " open a listing of the current directory in an horizontal window
:Vex    " open a listing of the current directory in a vertical window
:Tex    " open a listing of the current directory in a new tab
:Rex    " go back to the previous listing

$ vim . " open Vim with a listing of the current directory
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top