jistr / vim-nerdtree-tabs

NERDTree and tabs together in Vim, painlessly
Apache License 2.0
1.43k stars 130 forks source link

Improved behavior for tab opening on startup #87

Open samirotiv opened 7 years ago

samirotiv commented 7 years ago

Hi,

Just a suggestion:

If nerdtree_tabs_open_on_console_startup is set to 2, and if vim is opened with no argument, then tabs should show up.

This would make the behaviour complete.

Best, Samir.

jistr commented 7 years ago

Hi Samir,

i'm not sure what you mean by "tab should show up", but if you mean nerdtree should always show up on startup even when vim is started with no argument, then you can just set nerdtree_tabs_open_on_console_startup to 1. Perhaps the readme isn't clear enough about this.

If you mean that the tabs at the top of the screen should show up, i'm not sure there's any control over that... I think they just automatically appear whenever there's more than one.

samirotiv commented 7 years ago

I apologize for the lack in clarity. Sorry, I meant Nerdtree Tabs should open.

I have read the documentation. I will make it more explicit.

*Current behavior: open_on_console_startup = 1 Nerdtree tabs always opens on startup

open_on_console_startup = 2 Nerdtree tabs opens if:

  1. Directory Specified

Does not open if:

  1. File specified
  2. No argument specified

*Suggested behavior: open_on_console_startup = 1 Nerdtree tabs always opens on startup

open_on_console_startup = 2 Nerdtree tabs opens if:

  1. Directory Specified
  2. No argument specified

Does not open if:

  1. File specified

So, I suggest that if the user enters "vim", nerdtree should open. If he enters "vim file.txt" it should not open. If he enters "vim myfolder" it should open. This should be the behavior on setting open_on_console_startup=2.

I personally find it more convenient, since if I just want to open vim with nerdtree tabs, now, i need to type "vim ."

There are reports of users desiring such behavior around the net, as well.

Best, Samir.

On Fri, 24 Feb 2017 at 3:19 AM, Jiří Stránský notifications@github.com wrote:

Hi Samir,

i'm not sure what you mean by "tab should show up", but if you mean nerdtree should always show up on startup even when vim is started with no argument, then you can just set nerdtree_tabs_open_on_console_startup to

  1. Perhaps the readme isn't clear enough about this.

If you mean that the tabs at the top of the screen should show up, i'm not sure there's any control over that... I think they just automatically appear whenever there's more than one.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jistr/vim-nerdtree-tabs/issues/87#issuecomment-282132255, or mute the thread https://github.com/notifications/unsubscribe-auth/AEM6r54DU62lhgqS4t_brvi6STGgREJ_ks5rff7mgaJpZM4MKgis .