I'm trying to build a new plug-in following the instructions found in :
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.
which results in the following generated code:
- Code: Select all
def run(self, edit):
self.view.insert(edit, 0, "Hello, World!")
However, nothing happens when I try it out by following these directions:
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.
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.
1. http://docs.sublimetext.info/en/latest/ ... ugins.html