Question

I set VIM to open NERDTree whenever VIM is started by doing this: autocmd VimEnter * NERDTree

What changes should I make to my vimrc file so that the Bookmarks also open up whenever VIM & NerdTree are started?

Was it helpful?

Solution

let NERDTreeShowBookmarks=1 will display the bookmarks table on startup. If you wanted to actually open the files for editing, I'm not sure how to do that.

NERDTree provides a very nice documentation file. If you extracted the zip file in ~/.vim, it is located at ~/.vim/doc/NERD_tree.txt. If you want to use with vim's built in help, run :helptags ~/.vim/doc/ and then you'll be able to access it with :help NERDTree.

Of course, if you extracted the zip someplace else, replace ~/.vim with the folder you extracted it into.

OTHER TIPS

From the help file of Nerdtree :

2.2.1. The Bookmark Table NERDTreeBookmarkTable
If the bookmark table is active (see |NERDTree-B| and |'NERDTreeShowBookmarks'|), it will be rendered above the tree. You can double click bookmarks or use the |NERDTree-o| mapping to activate them. See also, |NERDTree-t| and |NERDTree-T|

So I guess that
let NERDTreeShowBookmarks=1 in your .vimrc should work.

I know this question was asked a while ago but since it is at the top of the google results I thought I would give the proper answer.

In your .vimrc file NERDTreeFromBookmark will not op a bookmark name BUT it will open a hard path.

For example:

au VimEnter *  NERDTreeFromBookmark /path/to/your/bookmark/folder/

This will open NERDTree at that location on VIM startup.

Hope that helps some people.

EDIT:

im guessing you could also do:

au VimEnter *  NERDTree /path/to/a/folder/
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top