I started writing a Plugin for Sublime Text 2.
I created a new folder in "Packages/RailsQuick"
And Created 2 files:
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"
}
]
The problem is that i cant find RailsQuick: Generators
in the Command Platte (CTRL + SHIFT + P)
Console logs after saving both files:
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
What am i doing wrong ?
My lucky guess:
Your class name is wrong. GeneratorsCommand
should match the one defined in RailsQuick.sublime-commands
(rails_quick_generators
). Sublime Text 2 needs to have 1:1 mapping between these names, otherwise it cannot know which plug-in belongs to which shortcut.
Example:
https://github.com/witsch/SublimePythonTidy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With