5 ms·
Nice article. I don't agree on the version numbering scheme though. In vim, version numbers are major.minor. Each plugin should define a variable g:loaded_PLUGI
by stewbrew 15y ago
Nice article. I don't agree on the version numbering scheme though. In vim, version numbers are major.minor. Each plugin should define a variable g:loaded_PLUGIN_NAME that is set to the version number as integer (= 100 * major + minor). I.e. 0.1 is 1, 1.2 is 102, 2.12 is 212. This is important for dependency management or when users put code into after/plugin/name.vim that patches a specific version of a plugin.
- stevelosh 15y agoWhy not use both? Use semantic versioning when tagging/releasing your project so humans can understand the version numbers. Set your g:loaded_yourplugin variable to the integer version of the major & minor components of the semver version number. You can ignore the bugfix component because the dependency management stuff is likely going to only care about which features are present.