I'm trying to adjust my vimrc to be portable and also run under Gvim 8 on Windows 10. I use Vundle as my package manager and it works perfectly on my Ubuntu machine. However, on Windows, it won't load. I've traced the problem to this line:

set rtp+="$HOME\\vimfiles\\bundle\\Vundle.vim\\"

After exploring the situation, I discovered that any path I give to runtimepath turns into the empty string. I've tried every combination of path separator characters, I've tried absolute paths, relative paths, paths using environment variables, everything. I've tried to set it to various paths on my machine which are simple enough that there's no possibility of typos. Regardless of what I set, rtp doesn't get changed.

After failing with the above, I started setting rtp using = instead of +=. When doing this, no matter what I set, echo &rtp is empty.

What do I need to do to convince vim to really set the runtime path?

1 Answer 1


In this case the double quote " starts a comment.

After removing the comment you have:

set rtp+=

While double (or single) quotes are normally used to enclose strings, the syntax for setting options is different. The set command predates Vim and was available in the original Vi.

PS: You can use forward slashes for runtimepath.

  • 1
    Worth adding that the normally you need double or single quotes for strings, but options have a different syntax.
    – D. Ben Knoble
    Commented Dec 19, 2018 at 23:34
  • @D.BenKnoble You are right, updated.
    – Ralf
    Commented Dec 21, 2018 at 7:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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