Shougo / neobundle.vim

Next generation Vim package manager
MIT License
2.29k stars 168 forks source link

Invalid runtimepath is detected in Windows #497

Closed ClaudiaJ closed 8 years ago

ClaudiaJ commented 8 years ago

Setting RTP with the following snippet:

  let &runtimepath = join([
        \ expand('$XDG_CONFIG_HOME/vim'),
        \ expand('$VIM/vimfiles'),
        \ expand('$VIMRUNTIME'),
        \ expand('$VIM/vimfiles/after'),
        \ expand('$XDG_CONFIG_HOME/vim/after')], ',')

echo expand('$VIMRUNTIME') outputs C:/Program Files/Vim/vim74

echo $VIMRUNTIME outputs C:\Program Files\Vim\vim74

The error is being triggered for this code:

let n = index(rtps, $VIMRUNTIME)

Because $VIMRUNTIME doesn't actually match any value in rtps, due to the difference between \ and /, plugin fails, despite technically valid runtimepath.

Temporary workaround is to add the following to vimrc before neobundle is called:

let $VIMRUNTIME=expand('$VIMRUNTIME')
Shougo commented 8 years ago

@ClaudiaJ I think expand() does not convert backslash. Have you set shellslash option?

I think it is your configuration problem. I don't recommend to set path manually.

ClaudiaJ commented 8 years ago

Whoops, you are right.

I mostly copied your dotfiles. I preferred shellslash on, but commenting that out makes the problem go away.