Pergunta

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.

Foi útil?

Solução

You can achieve that with this combination:

:NERDTree | only

Outras dicas

"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
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top