2016-03-07 8:24 GMT+03:00 Benjamin Fritz <fritzophre...@gmail.com>: > > > On Sat, Mar 5, 2016 at 7:27 AM, Bram Moolenaar <b...@moolenaar.net> wrote: >> >> >> Ben Fritz wrote: >> > >> > For Pathogen, you install by unzipping all files for a plugin, into a >> > directory under "bundle": >> > >> > ~/.vim/bundle/someplugin/plugin/foo.vim >> > ~/.vim/bundle/someplugin/autoload/bar.vim >> > ~/.vim/bundle/someplugin/syntax/beez.vim >> > >> > With packages, the default 'packpath' is the same as runtimepath. The >> > example code creates a ~/.vim/pack/my/always directory. Is "always" >> > synonymous with "someplugin" above? I.e. is "always" what you'd get >> > from cloning an existing plugin not designed specifically for a >> > packages setup? >> >> "always" is just a name. You got the directory name wrong. I renamed >> to avoid confusion. So now for one plugin: >> >> If you don't have a package but a single plugin, you need to create the >> extra >> directory level: >> % mkdir -p ~/.vim/pack/my/ever/something >> % cd ~/.vim/pack/my/ever/something >> % unzip /tmp/myplugin.zip >> >> You would now have these files: >> pack/my/ever/something/plugin/foo.vim >> pack/my/ever/something/syntax/some.vim >> > > I don't see this reflected in the help yet. I think the name "always" is > fine if it is explained. > > I attached a patch that does this explaining and clears up a few other > points of confusion I had. > > Also it changes ":loadplugin" to ":packadd" because ":loadplugin" doesn't > seem to exist anymore. > > See attached. > >> > What's "my" for? Is that the way to package multiple plugins together? >> > Is it necessary or can "someplugin" go directly under "pack"? The help >> > just mentions looking for an "ever" directory, it doesn't talk about >> > any intervening directories. >> >> "my" is the name of the package that you choose. As the help says: >> >> The directory name "my" is arbitrary, you can pick anything you like. >> > > Thanks, that was another point of confusion I had. I didn't even realize > "my" was the package name. > >> > You talked about dependencies...with this method, won't you >> > potentially have multiple copies of every dependency, if every plugin >> > that has a dependency defines a package instead to bundle the plugin >> > with all its dependencies? >> >> I would expect people who create several plugins that depend on a common >> library to have one package with all these plugins. >> > > Ah, so this would be where true plugin managers come in. A plugin manager > could be expected to track the dependencies between multiple plugins and > create a package for all related plugins in a group.
Without isolated namespaces this is absolutely useless behaviour. If A depends on B, C depends on B and D does not depend on anything and plugin manager created packages (A,B1), (C,B2) and (D) then out of B1 and B2 there will be only one used, whatever was found first (or last or first with errors from last, depending on how plugins and plugin manager are written). On the other hand creating package (A,B,C) and (D) if B is a library, A and D are filetype plugins and C is a universal linter would be rather strange choice, also where plugin manager is going to pull a package name from? Not to mention what is needed to be done if a plugin E is added that depends on D and B? Moving plugins around without an explicit reason is not fine. So if plugin manager is using packages it will create one package containing all plugins. Maybe additionally a user-defined packages that are needed to group plugins loaded at request by user when it is needed to load at one request more then one plugin, without “grouping by dependencies” nonsense. > >> > From the help for 'packpath' I expected every directory under ~/.vim >> > and ~/.vim/after to be searched recursively for an "ever" directory. I >> > don't see anything special about the "pack" directory in the help, but >> > just putting a new "ever" directory under my existing "bundles" and >> > moving anything inside doesn't seem to do anything. Is it because I >> > need a "my" directory of some kind? Or is "pack" actually special? How >> > does 'packpath' relate to this? >> >> All packages go under "pack". >> > > OK, "pack" was never mentioned explicitly, only in examples, so I described > it as I currently understand it. > > Please correct me if I'm wrong. > > -- > -- > You received this message from the "vim_dev" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_dev+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.