Hi,
I’m trying to build a new plug-in following the instructions found in [1]:
[quote]Let’s write a “Hello, World!” plugin for Sublime Text 2:
Select Tools | New Plugin… in the menu.
Save to Packages/User/hello_world.py.
[/quote]
which results in the following generated code:
class ExampleCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.insert(edit, 0, "Hello, World!")
However, nothing happens when I try it out by following these directions:
[quote]You’ve just written your first plugin. Let’s put it to use:
Create a new buffer (Ctrl+n).
Open the python console (Ctrl+`).
Type: view.run_command("example") and press enter.
You should see the text “Hello, World!” in your new buffer.[/quote]
In particular, when I when I execute view.run_command(“example”), nothing happens. That is, “Hello, World!” does not show up in file, and the only thing printed in the Python console is: >>> view.run_command(“example”).
I’m at a loss as what to do at this point. I’d be grateful for any suggestion.
Thanks,
Roger Alexander.