在 Windows 上安装 NERDTree
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4378560/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing NERDTree on Windows
提问by Vitor Py
I'm trying to install NERDTree (the Vim plugin) on Windows 7. I created a .vim directory on my user folder (C:/Users/Username) and extracted the plugin there. I've run :helptags ~.vim\doc and :helptags [full-path]. Closed and reopened Vim.
我正在尝试在 Windows 7 上安装 NERDTree(Vim 插件)。我在我的用户文件夹(C:/Users/Username)上创建了一个 .vim 目录并在那里解压了插件。我已经运行了 :helptags ~.vim\doc 和 :helptags [full-path]。关闭并重新打开 Vim。
But when I try:
但是当我尝试:
:NERDTree
the editor says:
编辑说:
E492: Not an editor command: NERDTree
How should I do it?
我该怎么做?
回答by Herbert Sitz
Windows doesn't use the '.vim' style directories. Instead you should put addons in directory structure branching off a vimfiles directory at one of two places:
Windows 不使用 '.vim' 样式目录。相反,您应该将插件放在从 vimfiles 目录中分出的两个位置之一的目录结构中:
c:\users\username\vimfiles\
c:\用户\用户名\vimfiles\
or
或者
c:\program files (x86)\vim\vimfiles\
c:\程序文件 (x86)\vim\vimfiles\
For a little more help you can do :h runtimepath
, and you could even modify runtimepath to make it work with your .vim directory, but safest route is just to go with the default vimfiles name oon Windows.
要获得更多帮助,您可以这样做:h runtimepath
,您甚至可以修改运行时路径以使其与您的 .vim 目录一起使用,但最安全的方法是使用 Windows 上的默认 vimfiles 名称。
回答by skeept
try extracting the file to vimfiles instead of .vim
尝试将文件解压缩到 vimfiles 而不是 .vim
回答by MigDus
None of the other answers worked for me, so I did the following:
其他答案都不适合我,所以我做了以下事情:
- The contents of directory ‘doc' gets copied to:
C:\Program Files\Vim\vimXX\doc
- The directory ‘nerdtree_plugin' is copied to
C:\Program Files\Vim\vimXX\
- The contents of directory ‘plugin' is
copied to
C:\Program Files (x86)\Vim\vimXX\plugin\
- 目录“doc”的内容被复制到:
C:\Program Files\Vim\vimXX\doc
- 目录“nerdtree_plugin”被复制到
C:\Program Files\Vim\vimXX\
- 目录“plugin”的内容被复制到
C:\Program Files (x86)\Vim\vimXX\plugin\
Where XX is your vim version number. Works for 7.4
其中 XX 是您的 vim 版本号。适用于 7.4
Source http://shawn.hamman.co.nz/