vim-pathogen
vim-pathogen copied to clipboard
Pathogen doesn't work with UNC paths on Windows
I'm trying to use pathogen with a vimfiles directory on a network share accessible via a UNC path (e.g., \networkdrive\profileDir\vimfiles). Pathogen does not seem to like this very much. I've done a little debugging, but not a lot. There are a few issue's I've seen.
- Just having
execute pathogen#infect()
doesn't seem to work. Looking at the debug output,pathogen#glob
is returning an empty list when I think it should be a list of directories. Further, my normal vimfiles directory gets mangled in the runtimepath to \networkdrive\profileDir\vimfiles, with a single leading slash instead of two. - I partially fixed that issue by calling
pathogen#infect(~/vimfiles/bundle/{})
instead. Pathogen will now find all my plugins and modify the runtimepath, but all the directories it adds are of the form \\networkdrive\profile\vimfiles\bundle\plugin, with three leading slashes. My normal vimfiles directory still starts with one. - I added a kludge
substitute
at the end ofpathogen#join
which replaces\\\\\\
with\\\\
. This fixes the added paths, so my bundled plugins load correctly now, but my normal vimfiles path is still mangled which means nothing else outside of the bundle directory gets loaded.
I've run vim with various debugging levels and put the logs up here.
I can't dig into this now, but I think you're correct in blaming pathogen#join()
. A tweak to the escape in the innermost while
is probably all that's needed.
Take a stab yourself, or post back both :set runtimepath?
and :echo &runtimepath
without pathogen, and I might have a look at some point in the future.
Not that I'm offering any useful help but I wonder if this issue is on a to-do list?
Would it be any help for me to post :set runtimepath?
and echo &runtimepath
without pathogen as mentioned above?
It's in an issue tracker, but you already knew that. And yes, I asked for those values because they would be helpful.
I'm feeling a little stupid now. I'll paste those values tomorrow when I'm back on that Windows machine.
:set runtimepath?
runtimepath=X:\vimfiles,X:\vimfiles\bundle\vim-kolor,C:\Program Files (x86)\Vim/vimfiles,C:\Program Files (x86)\Vim\vim74,C:\Program Files (x86)\Vim/vimfiles/after,X:\vimfiles/after
echo &runtimepath
without pathogen
X:\vimfiles,C:\Program Files (x86)\Vim/vimfiles,C:\Program Files (x86)\Vim\vim74,C:\Program Files (x86)\Vim/vimfiles/after,X:\vimfiles/after
Apologies for the earlier density. If I can add anything else that would be helpful please let me know.
I don't know if it's relevant or not but pathogen worked for adding a theme [kolor] but not for adding NERDTree. This is the issue that prompted me to check github for existing issues.
I don't see any UNC paths in there. Is this even the same issue?
On Fri, May 30, 2014 at 5:03 AM, padraic [email protected] wrote:
:set runtimepath? runtimepath=X:\vimfiles,X:\vimfiles\bundle\vim-kolor,C:\Program Files (x86)\Vim/vimfiles,C:\Program Files (x86)\Vim\vim74,C:\Program Files (x86)\Vim/vimfiles/after,X:\vimfiles/after
echo &runtimepath without pathogen X:\vimfiles,C:\Program Files (x86)\Vim/vimfiles,C:\Program Files (x86)\Vim\vim74,C:\Program Files (x86)\Vim/vimfiles/after,X:\vimfiles/after
Apologies for the earlier density. If I can add anything else that would be helpful please let me know.
I don't know if it's relevant or not but pathogen worked for adding a theme [kolor] but not for adding NERDTree. This is the issue that prompted me to check github for existing issues.
— Reply to this email directly or view it on GitHub https://github.com/tpope/vim-pathogen/issues/108#issuecomment-44629060.
The X drive is a networked drive
So no, not the same issue. Please open a new issue with your actual symptoms.