我开始为Sublime Text 2编写插件。
我在“Packages/RailsQuick”中创建了一个新文件夹
并创建了 2 个文件:
RailsQuick.py
import sublime, sublime_plugin
class GeneratorsCommand(sublime_plugin.WindowCommand):
def run(self):
self.window.show_quick_panel(["test"], None)
RailsQuick.sublime-commands
[
{
"caption": "RailsQuick: Generators",
"command": "rails_quick_generators"
}
]
RailsQuick: Generators
问题是我在 Command Platte (CTRL + SHIFT + P) 中找不到
保存两个文件后的控制台日志:
Writing file /home/danpe/.config/sublime-text-2/Packages/RailsQuick/RailsQuick.py with encoding UTF-8
Reloading plugin /home/danpe/.config/sublime-text-2/Packages/RailsQuick/RailsQuick.py
Writing file /home/danpe/.config/sublime-text-2/Packages/RailsQuick/RailsQuick.sublime-commands with encoding UTF-8
我究竟做错了什么 ?