Which is the recommended way/how would you cancel the load of a plugin in a condition.
I would like to use the new features like phantoms or hover listener inside packages, which should also support old Sublime Text versions and even ST2.
This would e.g. be a ViewListener, which adds Phantoms according to some logic. For backward compatibility it would be the easiest to just avoid the interpretation of this file in older Sublime Text versions.
I.e. something like:
if not sublime.version() >= "3118":
# cancel file parsing
- Raising an exception would be an opportunity, but this would log an console error and hence look like an error.
- Wrapping the rest of the file into the if block would just add an indent level, which obviously is not nice either.
Do you know a better option to do so?