无法获取这些附加组件(文德勒或者新捆绑) 在我的 Windows 7 机器上运行。每次我尝试安装插件时,都会收到以下错误消息:
Error detected while processing function neobundle#commands#check...neobundle#commands#install..
<SNR>21_install...neobundle#installer#sync..neobundle#util#system:
line 7: E484: Can't open file C:\Documents and Settings\user\Local Settings\Temp\VIo3342.tmp
Error detected while processing function neobundle#commands#check:
line 18: E171: Missing :endif
当我:sh
从 GVim 内部运行时,cmd.exe
打开git或者卷曲功能正常。
我的_vimrc文件:
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
" My Settings
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/vimfiles/bundle/neobundle.vim/
endif
" Required:
call neobundle#begin(expand('~/vimfiles/bundle/'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" My Bundles here:
NeoBundle 'Shougo/neosnippet.vim'
NeoBundle 'Shougo/neosnippet-snippets'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'kien/ctrlp.vim'
NeoBundle 'flazz/vim-colorschemes'
" You can specify revision/branch/tag.
" NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }
call neobundle#end()
" Required:
filetype plugin indent on
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
我感觉这里的问题是 GVim 尝试访问Documents and Settings
(带有空格)而不是仅仅C:\Users\user
......
更新 1
一定与我的环境变量或 GVim 启动方式有关。尝试在全新 Windows VM 上使用相同的配置和 GVim 构建,没有出现任何问题...
我应该在我的计算机上查找/检查哪些配置设置?
答案1
已解决问题。
问题出在我的用户我必须重置的环境变量:
%HOME% = %USERPROFILE%
%TEMP% = %USERPROFILE%\AppData\Local\Temp
%TMP% = %USERPROFILE%\AppData\Local\Temp