1

I have my $EDITOR set to vim --noplugin -n -i NONE +star, which is what I usually want when committing with git etc.

However, sometimes I decide I need those plugins (the builtin ~/.vim/pack kind, most of them /opt/-ional) after all. I can't seem to be able to load them; I've played with set lpl, packloadall and so ~/.vimrc but still plugins are unavailable.

What to do?

2

To load regular plugin files:

runtime! plugin/**/*.vim

(from :help startup, under :help load-plugins)


For packages, the story is a bit more complex. What I can suss out:

  • :packloadall loads non-optional (i.e., start) packages; use the ! to force it ("Packages will be loaded only once. […] When the optional ! is added this command will load packages even when done before.")
    • this command adds directories to the runtimepath, then sources the plugin files from only those directories (kind of like the above, but not)
  • :packadd adds the named opt package to runtimepath (but if loading from start was skipped, it tries there first). Then it sources the plugin files. With !, the only step is to add directories.
1
  • My .vimrc calls several :packadd's, but apparently, even after set lpl, they are still ignored when I re-source vimrc
    – usretc
    Nov 14 '20 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.