Tuesday, August 15, 2017

Re: Any way to make packadd load plugins in start when -u NONE or --noplugins are passed

skeept wrote:

> On Monday, August 14, 2017 at 11:16:50 PM UTC-5, Tony Mechelynck wrote:
> > On Tue, Aug 15, 2017 at 5:44 AM, skeept wrote:
> > > I have some plugins in the locations:
> > >
> > >
> > > ~/.vim/pack/bundle/start
> > > ~/.vim/pack/bundle/opt
> > >
> > > if I start vim with
> > > vim --noplugins
> > > vim -u NONE
> > >
> > > then I can load plugins from opt but not from start.
> > > So if a plugin say, unimpaired is in
> > >
> > > ~/.vim/pack/bundle/opt
> > >
> > > I can load it with
> > > packadd unimpaired
> > > (and completion works too).
> > > However if it is under start, no completion and if I try to load it explicitly I get the error:
> > >
> > > E919: Directory not found in 'packpath': "pack/*/opt/unimpaired"
> >
> > That is intentional, see :help :packadd
> > >
> > >
> > > Would it be possible to change the behavior to make it load the plugins on demand present in start when one of these 2 options are passed?
> >
> > No need. To load ~/.vim/pack/bundle/start/unimpaired.vim
> >
> > just do
> > :runtime pack/bundle/start/unimpaired.vim
> >
> > see :help :runtime
> >
> > >
> > > Thank you,
> > > Jorge Rodrigues
> >
> > Best regards,
> > Tony.
>
> Thanks Tony,
>
> I understand that this is the implemented behavior but I am trying to argue that in this case the behavior should be changed to allow to add plugins from start when those options are passed from the command line.
>
> :runtime pack/bundle/start/unimpaired.vim
>
> in my opinion is not practical, packadd is a lot more practical as you don't need to specify the path, just the package name, and also completion is offered.
>
> I am not very familiar with vim's code base, although I compile it often for windows and cygwin.
>
> If in the author/maintainers opinion this behavior would be accepted I will try to submit a patch for this. I would not be able to do it immediately but within a month time.
>
> Please let me know if there is interest in doing this or not.
>

For :runtime we have the START argument, which makes it look under
under "start" in 'packpath'. We could make :packadd START {name} look
in /start/ instead of /opt/.


--
We apologise again for the fault in the subtitles. Those responsible for
sacking the people who have just been sacked have been sacked.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment