Houl / repmo-vim

Repeat motions [for which a count was given]
38 stars 5 forks source link

Detect if repmo is loaded #11

Open HaleTom opened 2 years ago

HaleTom commented 2 years ago
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 commented 2 years ago

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

if dein#is_sourced('repmo-vim')

Houl commented 2 years ago

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

HaleTom commented 11 months ago

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