repmo-vim icon indicating copy to clipboard operation
repmo-vim copied to clipboard

Detect if repmo is loaded

Open HaleTom opened this issue 4 years ago • 3 comments

if exists("loaded_repmo")
    finish
endif
let loaded_repmo = 1

Should that be g:loaded_repmo? Would you accept a PR as such?

If not, how do I detect repmo is loaded. Pretty much every movement key breaks if it isn't :)

HaleTom avatar Dec 08 '21 12:12 HaleTom

I'm using dein plugin manager, so for now this works:

if dein#is_sourced('repmo-vim')

HaleTom avatar Dec 10 '21 05:12 HaleTom

If you can determine the loaded state without help of repmo, then this should be enough and actually the ideal solution?

Houl avatar Jan 16 '22 15:01 Houl

Actually, there's reasons that each plugin should set this kind of variable (eg prevent double loading), and it's an informal "standard".

I couldn't find the reference in the vim docs themselves, but it's basically the same as this

HaleTom avatar Nov 23 '23 04:11 HaleTom