0

enter image description here

I need help with vim. Just starting vim but struggling with settings. I placed the below plugin in vimrc as this:

Plug '~/my-prototype-plugin'

Also, why are some of my plugins not loaded?

  • 1
    Welcome to Vi and Vim! You're going to have to provide a lot more information to get a good answer to your question. Based on the screenshot, it appears you have a plugin manager set up. Can you edit to describe which one and include the relevant parts of your vimrc? That should help us figure out what's going on. – D. Ben Knoble May 12 at 12:49
1

A vim-plug plugin spec that includes a local file system path is an "un-managed" plugin.

" Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin'

That means you intend to take care of downloading and building it. You're just telling vim-plug where you've put it.

If you want vim-plug to take care of everything it needs to just be Plug '<github owner>/<github project>' like

Plug 'vim-airline/vim-airline'   

As for the others you haven't provided enough information to definitively identify the problem. One clue is some of the vim-plug code:

" `s:loaded` entry can be missing if PlugUpgraded  
if is_dir && get(s:loaded, name, -1) == 0 
    ...
    let msg .= ' (not loaded)'              

That suggests something like running the PlugUpgrade command but not following that with a vim restart or, possibly, a run of PlugUpdate.

It may also occur if you've configured lazy loading for a plugin. Something with the 'on' or 'for' clause like...

Plug 'guns/vim-sexp', {'for': 'clojure'}

With this configuration I could get the "not loaded" message if I checked status without having loaded a Clojure file.

I'd urge you to read everything from the project's github page. Much useful information including the answer to the first question is there.

| improve this answer | |
  • Thank you for your time. – CabdiQoole May 12 at 17:20
0

It looks like you simply copied the [example snippet from vim-plug's readme https://github.com/junegunn/vim-plug/blob/master/README.md#example verbatim, while setting up vim-plug.

That example is not really meant to be used directly, but more to illustrate vim-plug's capabilities.

For the unmanaged plug-in:

" Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin'

That's meant to be for a plug-in you're writing yourself, as the name "prototype plugin" suggests.

If you create a new directory ~/my-prototype-plugin (note that ~ means your home directory here) and add that snippet to your vimrc, vim-plug will be happy to load your plug-in but it won't try to install or upgrade it (since it's not on a GitHub repository to start with.)

You're probably getting this error because you added this line but you don't have any ~/my-prototype-plugin directory with a plug-in you're writing. So you should just remove that line from your vimrc.

Regarding the (not loaded) ones, these two come from that same example in the readme file:

" On-demand loading
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }

They're using the 'on' and 'for' clauses of vim-plug, which means they're only loaded when a specific command is executed, or when a file of a specific type is opened. So that's also expected. That's normal, expected behavior. Nothing to fix here.

(Not sure why you're also getting it with goyo.vim, that doesn't seem to be coming from that sample readme file and the installation instructions on goyo.vim don't mention any conditional clauses.)

So I guess you should at least remove the Plug line for the inexistent plug-in in your home directory, that one doesn't make sense to you.

Regarding the other lines you got from the example, I guess it's OK if you want to keep them... But you don't really have to. As I mentioned, that list is mostly an example of how to use vim-plug features, such as the conditional loads.

You could just remove all of those Plug lines and everything would keep working. Just add Plug lines for the plug-ins you actuallywant to use in Vim and vim-plug will manage those for you.

| improve this answer | |
  • 1
    Thank you for your time. – CabdiQoole May 12 at 17:20

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.