VIM - NerdTree - VIM 启动时打开书签
我将 VIM 设置为在 VIM 启动时打开 NERDTree,方法是: autocmd VimEnter * NERDTree
我应该对我的 vimrc 文件进行哪些更改,以便每当 VIM 和 NERDTree 时书签也打开。 NerdTree 启动了吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
let NERDTreeShowBookmarks=1
将在启动时显示书签表。如果您想实际打开文件进行编辑,我不知道该怎么做。NERDTree 提供了一个非常好的文档文件。如果您在 ~/.vim 中提取了 zip 文件,则它位于 ~/.vim/doc/NERD_tree.txt。如果您想使用 vim 的内置帮助,请运行
:helptags ~/.vim/doc/
,然后您就可以使用:help NERDTree
访问它。当然,如果您将 zip 解压到其他位置,请将 ~/.vim 替换为您解压到的文件夹。
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.
来自 Nerdtree 的帮助文件:
所以我猜
.vimrc
中的let NERDTreeShowBookmarks=1
应该可以工作。From the help file of Nerdtree :
So I guess that
let NERDTreeShowBookmarks=1
in your.vimrc
should work.我知道这个问题不久前被问过,但由于它位于谷歌结果的顶部,我想我会给出正确的答案。
在你的 .vimrc 文件中 NERDTreeFromBookmark 不会操作书签名称,但会打开一个硬路径。
例如:
这将在 VIM 启动时在该位置打开 NERDTree。
希望能帮助一些人。
编辑:
我猜你也可以这样做:
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:
This will open NERDTree at that location on VIM startup.
Hope that helps some people.
EDIT:
im guessing you could also do: