inkarkat / vim-mark

Highlight several words in different colors simultaneously.
http://www.vim.org/scripts/script.php?script_id=2666
266 stars 32 forks source link

I often encounter this mistake for no reason:mark#UpdateMark #29

Closed gVimer closed 4 years ago

gVimer commented 4 years ago

Windows+gVim8.2 A86BQgc4S0 处理 function mark#UpdateMark 时发生错误: 第 2 行: E117: Unknown function: ingo#actions#EvaluateOrFunc

inkarkat commented 4 years ago

Sorry for replying so late; I hope you have figured it out yourself by now!

You also need to install the ingo-library plugin (or via GitHub). It's listed in the dependencies. This library contains common autoload functions that are used by almost all of my plugins; it avoids code duplication and versioning issues.

gVimer commented 4 years ago

Thank you for your reply.I forgot this step when I reinstalled the plug-in.Now It's OK.THX!

gVimer commented 4 years ago

Maybe there should be a more friendly hint!

inkarkat commented 4 years ago

It is now possible to customize the issue template within GitHub; I plan to do that for all my plugins, asking Are you sure you've installed the ingo-library?! That hopefully catches a large percentage of this common mistake.

The plugin itself could do a check for the existence of the library, but that would be one more otherwise useless script to load, and then another conditional in each plugin. Not much, but it still adds up if you have 100+ plugins (like I have). And it wouldn't help with version mismatches, e.g. if the plugin needs version 1.030 but you forgot to update and only have 1.029.

The right way to solve this would be through proper dependency management. Some Vim plugin managers have that, but as there's no agreed-upon format for specifying dependencies, someone has to manually curate this meta-data, and then it's only for that particular plugin manager.

gVimer commented 4 years ago

OK, I know what you mean. Certainly,Reading the document carefully is the best way to solve some problems。 Thank you for your reply again。