Maybe the question title is not too specific. So let me explain:
This is for this GitHub fork, for the numbertoggle Vim plugin. Please check the structure of my fork, to understand what I mean.
What I need is a way to deactivate it, after it’s been loaded. In other words, completely erase it off the charts if that function is called.
In other, other words. If the plugin is called, and I do :call NumberToggleOff() then it will disable it and act as Vim would normally function.
What would be a good way to achieve this? I’ve tried several methods, but none works.
Thanks for your help!
Normally it can be done by surrounding autocommands by
and remembering
{lhs}of the mapping. To disable it you then doIt would be much better if instead of using a bunch of
delfunctioncalls you convert all function names tog:numbertoggle.toggle,g:numbertoggle.update, … and just leaveunlet g:numbertoggle.It completely undoes effect of the plugin, not just disables it.