|
8 | 8 |
|
9 | 9 |
|
10 | 10 | class Example(object):
|
11 |
| - u""" |
12 |
| - Example plugin. |
13 |
| -
|
14 |
| - TODO: Extend this doc! |
15 |
| - """ |
16 |
| - |
17 |
| - def __init__(self): |
18 |
| - u""" Initialize plugin """ |
19 |
| - object.__init__(self) |
20 |
| - # menu entries this plugin should create |
21 |
| - self.menu = ORGMODE.orgmenu + Submenu(u'Example') |
22 |
| - |
23 |
| - # key bindings for this plugin |
24 |
| - # key bindings are also registered through the menu so only additional |
25 |
| - # bindings should be put in this variable |
26 |
| - self.keybindings = [] |
27 |
| - |
28 |
| - # commands for this plugin |
29 |
| - self.commands = [] |
30 |
| - |
31 |
| - @classmethod |
32 |
| - def action(cls): |
33 |
| - u""" |
34 |
| - Some kind of action. |
35 |
| -
|
36 |
| - :returns: TODO |
37 |
| - """ |
38 |
| - pass |
39 |
| - |
40 |
| - def register(self): |
41 |
| - u""" |
42 |
| - Registration of the plugin. |
43 |
| -
|
44 |
| - Key bindings and other initialization should be done here. |
45 |
| - """ |
46 |
| - # an Action menu entry which binds "keybinding" to action ":action" |
47 |
| - self.commands.append(Command(u'OrgActionCommand', |
48 |
| - u':py ORGMODE.plugins["Example"].action()')) |
49 |
| - self.keybindings.append(Keybinding(u'keybinding', |
50 |
| - Plug(u'OrgAction', self.commands[-1]))) |
51 |
| - self.menu + ActionEntry(u'&Action', self.keybindings[-1]) |
52 |
| - |
53 |
| -# vim: set noexpandtab: |
| 11 | + u""" |
| 12 | + Example plugin. |
| 13 | +
|
| 14 | + TODO: Extend this doc! |
| 15 | + """ |
| 16 | + |
| 17 | + def __init__(self): |
| 18 | + u""" Initialize plugin """ |
| 19 | + object.__init__(self) |
| 20 | + # menu entries this plugin should create |
| 21 | + self.menu = ORGMODE.orgmenu + Submenu(u'Example') |
| 22 | + |
| 23 | + # key bindings for this plugin |
| 24 | + # key bindings are also registered through the menu so only additional |
| 25 | + # bindings should be put in this variable |
| 26 | + self.keybindings = [] |
| 27 | + |
| 28 | + # commands for this plugin |
| 29 | + self.commands = [] |
| 30 | + |
| 31 | + @classmethod |
| 32 | + def action(cls): |
| 33 | + u""" |
| 34 | + Some kind of action. |
| 35 | +
|
| 36 | + :returns: TODO |
| 37 | + """ |
| 38 | + pass |
| 39 | + |
| 40 | + def register(self): |
| 41 | + u""" |
| 42 | + Registration of the plugin. |
| 43 | +
|
| 44 | + Key bindings and other initialization should be done here. |
| 45 | + """ |
| 46 | + # an Action menu entry which binds "keybinding" to action ":action" |
| 47 | + self.commands.append(Command(u'OrgActionCommand', |
| 48 | + u':py ORGMODE.plugins["Example"].action()')) |
| 49 | + self.keybindings.append(Keybinding(u'keybinding', |
| 50 | + Plug(u'OrgAction', self.commands[-1]))) |
| 51 | + self.menu + ActionEntry(u'&Action', self.keybindings[-1]) |
0 commit comments