问题
I'm using Sublime text 3 and I'm writing a simple plugin,
the problem that i have is that whenever i put myplugin.py
in the Packages/User
folder I get the result perfectly.
BUT when I move myplugin.py
file to a folder for example myplugin/myplugin.py
the plugin is not working anymore. I tried to see if there is any information logged to the console but I found nothing related to my problem.
Can any one tell me what is exactly the problem and what I'm doing wrong?
回答1:
Actually I was missing the fact that a sublime text plugin should be living in the Packages folder and not Packages/User folder
回答2:
You need to have a file '__init__.py'
created in the myplugin folder with that file. Otherwise you will be unable to load the file as a module.
来源:https://stackoverflow.com/questions/33464819/sublime-text-plugin-is-not-working