After much reading, I still can't get Pathogen to load a plugin under Windows

前端 未结 1 1173
灰色年华
灰色年华 2021-01-23 12:37

For gVim 7.3.46 on Windows 7 64-bit fully updated (I run gVim 7.3.46 because it adds a reliable instance of \"Edit with Vim\" to the Windows context menu.)

Despite havin

相关标签:
1条回答
  • 2021-01-23 13:14

    mru.vim should be placed in the bundle folder such that the path is

    D:\Program Files (x86)\Vim\vimfiles\bundle\mru\plugin\mru.vim
    

    Although it should really be placed inside vimfiles in your home directory not Program Files

    $HOME\vimfiles\bundle\mru\plugin\mru.vim
    

    Pathogen makes it so that every folder in bundle is part of the vim runtime path. This allows every plugin in the bundle folder to have a clean environment for it to store all related files.


    For example if you had two plugins that had more than one file (for example they both came with documentation).

    Then the file structure of the vimfiles folder would look something like this.

    vimfiles/
        plugin/
            plugin1.vim
            plugin2.vim
        doc/
            plugin1.txt
            plugin2.txt
    

    But what happens when you want to remove one of the plugins you need to go find each and everyone of the files (and you might miss some).

    With Pathogen installed your directory structure would probably look something like this.

    vimfiles/
        bundle/
            plugin1/
                plugin/
                    plugin1.vim
                doc/
                    plugin1.txt
            plugin2/
                plugin/
                    plugin2.vim
                doc/
                    plugin2.txt
    

    Pathogen appends all of the folders under the bundle folder to the vim runtime path. This allows vim to find the files and vim is none the wiser that its not in the usual place.

    This also allows for easier removal of plugins. You don't have to go searching for all the files that came with the plugin you just need to remove the relevant folder from the bundle folder.


    Just for completion sake. (You don't need to do this if you don't want to)

    Installation.

    If you used git you can now go to the github page for vim-scripts and find the plugin you want. Since you were interested in using mru the link to the mru plugin is https://github.com/vim-scripts/mru.vim

    Now to install the plugin you just need to go into the bundle folder and run

    git clone https://github.com/vim-scripts/mru.vim
    

    All the scripts in the vim scripts repository have the proper structure that pathogen is expecting so after running that one command you are done installing the plugin.

    0 讨论(0)
提交回复
热议问题