0

Can't get these add-ons (vundle or neobundle) to work on my Windows 7 machine. Everytime I try to install plugins I'm getting the following error messages:

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

When I run :sh from within GVim, cmd.exe opens up where git or curl function properly.

My _vimrc file:

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

I have a feeling that the issue here is that GVim tries to access Documents and Settings (with spaces) instead of just C:\Users\user...

Update 1

Must be something related to my environmental variables or the way GVim launched. Tried to use the same config and GVim build on a fresh Windows VM and didn't have any issues there...

Are there any configuration settings I should look for/check on my computer?

  • Does the directory exist, and is it accessible from within Vim (which is 32 or 64-bit)?! – Ingo Karkat Apr 9 '14 at 15:37
  • @IngoKarkat: Yes, the directory exists on my machine and it resolves to c:\Users\user\AppData\Local\Temp\. I'm using 32bit version of Vim. How can I check if this directory is accessible from within GVim/Vim? – Timka Apr 9 '14 at 16:16
  • How about :edit C:\Documents and Settings\user\Local Settings\Temp\test.txt?! – Ingo Karkat Apr 9 '14 at 16:18
  • @IngoKarkat: Hm, interesting. I was able to open the file in this directory (there was also test.txt.swp file in there too) but I can't save my changes to this file. Getting "E212: Can't open file for writing" when I click SAVE button – Timka Apr 9 '14 at 16:24
0

Fixed the problem.

The issue was with my User environment variables that I had to reset to:

%HOME% = %USERPROFILE%
%TEMP% = %USERPROFILE%\AppData\Local\Temp
%TMP% = %USERPROFILE%\AppData\Local\Temp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.