Document how to install plugin from repo subdirectory

Issue #109 new
David Barnett created an issue

The vim-addon-manager README says VAM supports subdirectories of repositories:

Also: Of course VAM allows using subdirectories of repositories as runtimepath. Eg See vim-pi-patching.

But no vim-pi-patching tag seems to exist anywhere.

How can I load a vim plugin from a repo subdirectory in VAM, e.g. load the src/etc/vim subdir of https://github.com/mozilla/rust.git? Is it also possible to declare a plugin in a repo subdirectory in the vim-pi metadata, so :VAMInstall PLUGINNAME will know to load the right subdir onto runtimepath?

Comments (4)

  1. David Barnett reporter

    I poked around in the VAM code and found that a "runtimepath" key in the addon-info.json root will cause a plugin to be loaded from a repo subdirectory, however there still doesn't seem to be any way to declare multiple plugins in a single repo, which is what I was hoping for. VAM checks out the repo root dir into a vim-addons/ subdir, and then reads addon-info.json from the plugin root.

    Am I correct that multiple plugins in a single repo is not supported?

  2. ZyX_I

    Am I correct that multiple plugins in a single repo is not supported?

    If you are the developer and want to create addon-info.json then you must have one plugin per repo. If there is no addon-info.json by default then vim-pi database may (and actually does) contain entries with same URL, but different names and runtimepaths. In that case addon-info.json is provided by the VAM itself based on vim-pi database entry and directories are derived from plugin names, so it is possible to use multiple plugins from one repository URL, but this repository will be checked out once per each plugin you want to use.

  3. ZyX_I

    There is an “exception” for this rule: if VCS allows checking out some subdirectory without using some special command you may have all plugins in one repository.

  4. Log in to comment