运行 时出错:PlugInstall

Error when running :PlugInstall

我想使用 vim-plug 来管理插件,但是当我 运行 ":PlugInstall" 时抛出这个错误: Vim error after :PlugInstall in cmder

我在 vimrc 文件中只有这个:

call plug#begin()
Plug 'scrooloose/nerdtree'
call plug#end()

set ruler
set number

set laststatus=2

我正在使用 Windows 10 x64,cmder 作为终端和 vim 7.4.827。

由于某种原因,您的临时文件夹似乎不可写。它位于 C:\Users\<username>\AppData\Local\Temp。检查文件夹是否在其设置中具有只读属性,如果可能则取消选中。

这是插件wiki的引用post Windows System Error E484:

There are two possible causes we've encountered.

  1. Bad escaping. On Windows, if you use '<', '>' or '|' in the file path, vim-plug is known to fail. Any other chars should be fine.

  2. System changes due to AutoRun commands executed on cmd.exe startup. See docs.

To see if your system suffers this second problem, run these reg queries. If either one returns a path to a bat file, you should carefully read it. You may have to edit/disable it to get vim-plug working.

REG QUERY "HKCU\Software\Microsoft\Command Processor" /v AutoRun
REG QUERY "HKLM\Software\Microsoft\Command Processor" /v AutoRun

PS:issues 229 读起来可能很有趣。

PPS: 另外如果你在你的 _vimrc 中只提到了行那么你可能遗漏了 set nocompatible.