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.

Était-ce utile?

La solution

You can achieve that with this combination:

:NERDTree | only

Autres conseils

"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
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top