Skip to content

Pathogen doesn't work with UNC paths on Windows #108

Open

Description

@krispharper

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 of pathogen#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.

vim -Vlog

vim -V12log

vim -V15log

Activity

  1. tpope commented on Oct 24, 2013

    @tpope
    Owner

    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.

  2. padraic7a commented on May 29, 2014

    @padraic7a

    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?

  3. tpope commented on May 29, 2014

    @tpope
    Owner

    It's in an issue tracker, but you already knew that. And yes, I asked for those values because they would be helpful.

  4. padraic7a commented on May 29, 2014

    @padraic7a

    I'm feeling a little stupid now. I'll paste those values tomorrow when I'm back on that Windows machine.

  5. padraic7a commented on May 30, 2014

    @padraic7a

    :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.

  6. tpope commented on May 30, 2014

    @tpope
    Owner

    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 notifications@github.com 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
    #108 (comment).

  7. padraic7a commented on May 30, 2014

    @padraic7a

    The X drive is a networked drive

  8. tpope commented on May 30, 2014

    @tpope
    Owner

    So no, not the same issue. Please open a new issue with your actual symptoms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions