Skip to content

Conversation

@ggicci
Copy link
Contributor

@ggicci ggicci commented Oct 9, 2016

Update README file, add directives to open NERDTree as a window automatically when vim starts up on opening a directory. Which can prevent NERDTree from hiding when first file selected as issue #494 pointed out.

README.markdown Outdated


---
> How can I open NERDTree as a tab window automatically when vim starts up on opening a directory?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the term "tab window". Tabs and Windows are separate things in vim, and putting them together like this is a bit confusing. I suggest just "window".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I meant b:NERDTree._type == "tab" here. But it's really confusing for others.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Martin uses the term "tab tree" in #494. How do you like this sentence?

How can I open NERDTree as a tab-tree window automatically when vim starts up on opening a directory?

@PhilRunninger
Copy link
Member

@ggicci, It looks like this PR is a continuation of #627, which you closed. Did you know you can continue committing to your branch, and the pull request will get those changes as well?

@PhilRunninger
Copy link
Member

This is very similar to, and better than, another tip in the README. Go ahead and remove this one while you're at it.

---
> How can I open NERDTree on startup, and have my cursor start in the other window?

Stick this in your vimrc:

    autocmd vimenter * NERDTree
    autocmd vimenter * wincmd p

 *via [stackoverflow/Yohann](http://stackoverflow.com/questions/4277808/nerdtree-auto-focus-to-file-when-opened-in-new-tab/19330023#19330023)*

@ggicci ggicci changed the title Add note in README: trick to open NERDTree as a tab window on startup. Add note in README: trick to open NERDTree as a window on startup. Oct 10, 2016
@PhilRunninger PhilRunninger merged commit 148e857 into preservim:master Oct 10, 2016
PhilRunninger added a commit that referenced this pull request Oct 10, 2016
Adjusted the wording of one of the tips, and added a sentence about the type of NERDTree window that is displayed. See pull reqest #628.
Leandros pushed a commit to Leandros/nerdtree that referenced this pull request Oct 21, 2016
Adjusted the wording of one of the tips, and added a sentence about the type of NERDTree window that is displayed. See pull reqest preservim#628.
@kevincantu
Copy link

Thank you @ggicci !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants