NERDTree 自动加载特定目录
我在 Windows 中使用 gvim。默认情况下,nerdtree 默认加载 C:\ 驱动器。我想将其更改为 E:\ 驱动器。如何实现这一点?
每当我尝试使用 :NERDTree 命令启动 NERDTree 时,都会收到此错误 E492: Not an editor command: NERDTree
I'm using gvim in windows.By default nerdtree loads C:\ drive as default.I like to change it to E:\ drive.How to achieve this?
Whenever I try to start NERDTree using :NERDTree command, I get this error E492: Not an editor command: NERDTree
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我的 vimrc 文件中有以下代码
cd
命令不是 NerdTree 特定的。它只是在 Vim 启动时更改工作目录,这对我来说是明智的。I have the following code in my
vimrc
fileThe
cd
command is not NerdTree specific. It just changes the working directory when Vim starts to something which for me is sensible.来自 NERDTree 帮助文件:
<代码>
:NERDTree [<开始目录> | <书签>] *:NERDTree*
打开一棵新的书呆子树。树的根取决于参数
给予。有3种情况: 如果不指定参数,则当前目录
将被使用。如果给出了目录,则将使用该目录。如果有书签
给出名称,将使用相应的目录。例如:>
:NERDTree /home/marty/vim7/src
:NERDTree foo (foo 是书签的名称)
From the NERDTree help-file:
:NERDTree [<start-directory> | <bookmark>] *:NERDTree*
Opens a fresh NERD tree. The root of the tree depends on the argument
given. There are 3 cases: If no argument is given, the current directory
will be used. If a directory is given, that will be used. If a bookmark
name is given, the corresponding directory will be used. For example: >
:NERDTree /home/marty/vim7/src
:NERDTree foo (foo is the name of a bookmark)
在我的
vimrc
文件中,我使用这个autocmd vimenter * NERDTree G:\
。G:\
应该设置为默认驱动器,但是,这只是 NERDTree 的工作目录。添加 cd G:\ 更改 vim 启动工作目录。就像 Jeromy Anglim 所说的那样。In my
vimrc
file,I use thisautocmd vimenter * NERDTree G:\
.TheG:\
should be set your default drive,but, it's only the NERDTree's work dir. addcd G:\
change the vim start work dir.Just like Jeromy Anglim said that.