<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to python API</title><link>https://sourceforge.net/p/synwrite/wiki/python%2520API/</link><description>Recent changes to python API</description><atom:link href="https://sourceforge.net/p/synwrite/wiki/python%20API/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 07 Feb 2017 16:45:43 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/synwrite/wiki/python%20API/feed" rel="self" type="application/rss+xml"/><item><title>python API modified by Alexey T.</title><link>https://sourceforge.net/p/synwrite/wiki/python%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v11
+++ v12
@@ -1,21 +1,16 @@
 This page describes API for SynWrite plugins written in Python.  
-The following plugin types are supported:
+Plugin types:

-* Command plugins: Activated by user when calling menu items in "Plugins" menu.
-* Event plugins: Activated by SynWrite when some event occurs in editor, e.g. "text changed" or "file saved".
-* Auto-completion plugins: Special case of event plugins. Activated by "Auto-completion popup" command (Ctrl+Space hotkey) or "Function hint" command (Ctrl+Shift+Space hotkey).
-* Goto-definition plugins: Special case of event plugins. Activated by "Go to definition" menu item from editor context menu.
+- Command plugins: Activated by user when calling menu items in "Plugins" menu. Method name in "Command" class: "run" or any other.
+- Event plugins: Activated by SynWrite when some event occurs in editor, e.g. "text changed" or "file saved". Method name in "Command" class: one of [py event names].
+- Auto-completion plugins: Special case of event plugins. Activated by "Auto-completion popup" command (Ctrl+Space hotkey) or "Function hint" command (Ctrl+Shift+Space hotkey).
+- Goto-definition plugins: Special case of event plugins. Activated by "Go to definition" menu item from editor context menu.

-Method name in "Command" class should be:
+Functions
+=========

-* Command plugins: "run" or other.
-* Event plugins: one of [py event names].
-
-List of functions
-=================
-
-* [python API functions]
-* [python API changes]
+- [python API functions]
+- [python API changes]

 Example for command plugin
 ==========================
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexey T.</dc:creator><pubDate>Tue, 07 Feb 2017 16:45:43 -0000</pubDate><guid>https://sourceforge.net5e6b6074a560cf1c7472b36ee00811f42a845abb</guid></item><item><title>python API modified by Alexey T.</title><link>https://sourceforge.net/p/synwrite/wiki/python%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v10
+++ v11
@@ -11,8 +11,82 @@
 * Command plugins: "run" or other.
 * Event plugins: one of [py event names].

-Funcs
-=====
+List of functions
+=================

 * [python API functions]
 * [python API changes]
+
+Example for command plugin
+==========================
+
+`install.inf` declares method "run" with lexers attached.
+
+```
+[info]
+title=AStyle Format
+desc=Formats source code for these lexers: C, C++, C#, Java; uses AStyle library
+type=py-plugin
+subdir=syn_astyle_format
+
+[ini]
+section=Commands
+id=AStyle Format\Format
+params=run;C,C++,C#,Java;;
+```
+
+`__init__.py` has code of method "run".
+
+```
+from sw import *
+import sys
+import os
+
+class Command:
+    def run(self):
+        pass
+        #some work
+```
+
+
+Example for event plugin
+========================
+
+`install.inf` declares event "on_caret_move" and method "jump".
+
+```
+[info]
+title=Brackets Hilite
+desc=Highlights pair brackets for caret position, when caret moves
+type=py-plugin
+subdir=syn_brackets_hilite
+
+[ini1]
+section=Events
+id=BracketsHilite
+params=on_caret_move
+
+[ini2]
+section=Commands
+id=Brackets Hilite\Go to pair bracket
+params=jump
+```
+
+`__init__.py` has code for event, and for method.
+
+```
+import os
+import shutil
+from sw import *
+
+class Command:
+
+    def on_caret_move(self, ed_self):
+        pass
+        #handle event
+        
+    def jump(self):
+        pass
+        #work
+```
+
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexey T.</dc:creator><pubDate>Sat, 07 Jan 2017 04:05:11 -0000</pubDate><guid>https://sourceforge.netd0d9e349cd84fd417de8c961fb49b45793f2bd62</guid></item><item><title>python API modified by Alexey T.</title><link>https://sourceforge.net/p/synwrite/wiki/python%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v9
+++ v10
@@ -1,19 +1,18 @@
 This page describes API for SynWrite plugins written in Python.  
-Currently the following plugin types are supported:
+The following plugin types are supported:

-Plugin type | Meaning
-------------|--------
-Command plugins | Activated by user when calling menu item in "Tools -- Plugins" menu.
-Event plugins | Activated by SynWrite when some event occurs in editor, e.g. "text changed" or "file saved".
-Auto-completion plugins | Special case of event plugins. Activated by "Auto-completion popup" command (Ctrl+Space hotkey) or "Function hint" command (Ctrl+Shift+Space hotkey).
-Goto-definition plugins | Special case of event plugins. Activated by "Go to definition" menu item from editor context menu.
+* Command plugins: Activated by user when calling menu items in "Plugins" menu.
+* Event plugins: Activated by SynWrite when some event occurs in editor, e.g. "text changed" or "file saved".
+* Auto-completion plugins: Special case of event plugins. Activated by "Auto-completion popup" command (Ctrl+Space hotkey) or "Function hint" command (Ctrl+Shift+Space hotkey).
+* Goto-definition plugins: Special case of event plugins. Activated by "Go to definition" menu item from editor context menu.

-Method name in Python class should be:
+Method name in "Command" class should be:

-Plugin type | Method name
-------------|------------
-Command plugins | Name `run` or any other.
-Event plugins | See [py event names].
+* Command plugins: "run" or other.
+* Event plugins: one of [py event names].

-You can find list of API functions at [python API functions].
-You can find changes-log of API at [python API changes].
+Funcs
+=====
+
+* [python API functions]
+* [python API changes]
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexey T.</dc:creator><pubDate>Tue, 21 Jun 2016 12:47:21 -0000</pubDate><guid>https://sourceforge.net67bec7d4001da33adbfa89b7cae1f06294a7745c</guid></item><item><title>python API modified by Alexey T.</title><link>https://sourceforge.net/p/synwrite/wiki/python%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v8
+++ v9
@@ -1,21 +1,19 @@
-This page describes API for SynWrite plugins written in Python.
+This page describes API for SynWrite plugins written in Python.  
 Currently the following plugin types are supported:

 Plugin type | Meaning
 ------------|--------
-Command plugins | activated by user when clicking (or using a hotkey) of menu item in "Tools -- Plugins" menu.
-Auto-completion plugins | activated by "Auto-completion popup" command (Ctrl+Space hotkey).
-Find-id plugins | activated by "Go to definition" menu item from editor context menu.
-Event plugins | activated by SynWrite when some event occurs in editor, e.g. "text changed" or "file saved".
+Command plugins | Activated by user when calling menu item in "Tools -- Plugins" menu.
+Event plugins | Activated by SynWrite when some event occurs in editor, e.g. "text changed" or "file saved".
+Auto-completion plugins | Special case of event plugins. Activated by "Auto-completion popup" command (Ctrl+Space hotkey) or "Function hint" command (Ctrl+Shift+Space hotkey).
+Goto-definition plugins | Special case of event plugins. Activated by "Go to definition" menu item from editor context menu.

 Method name in Python class should be:

 Plugin type | Method name
-------------|----------
-Command plugins | name `run` or any other (must be specified in SynPlugins.ini file)
-Auto-completion plugins | fixed name `complete`
-Find-id plugins | fixed name `findid`
-Event plugins | listed at [py event names] (must be specified in SynPlugins.ini file)
+------------|------------
+Command plugins | Name `run` or any other.
+Event plugins | See [py event names].

 You can find list of API functions at [python API functions].
 You can find changes-log of API at [python API changes].
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexey T.</dc:creator><pubDate>Sun, 13 Apr 2014 16:29:50 -0000</pubDate><guid>https://sourceforge.net95fe5d27601defda63c35fbf493b0f0b88182b0e</guid></item><item><title>python API modified by Alexey T.</title><link>https://sourceforge.net/p/synwrite/wiki/python%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -5,7 +5,7 @@
 ------------|--------
 Command plugins | activated by user when clicking (or using a hotkey) of menu item in "Tools -- Plugins" menu.
 Auto-completion plugins | activated by "Auto-completion popup" command (Ctrl+Space hotkey).
-Find-id plugins | activated by "Find id" menu item from editor context menu.
+Find-id plugins | activated by "Go to definition" menu item from editor context menu.
 Event plugins | activated by SynWrite when some event occurs in editor, e.g. "text changed" or "file saved".

 Method name in Python class should be:
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexey T.</dc:creator><pubDate>Fri, 28 Feb 2014 18:29:05 -0000</pubDate><guid>https://sourceforge.net4582386e8bffd57b5ec0d6da4f39efac30d44baa</guid></item><item><title>python API modified by Alexey T.</title><link>https://sourceforge.net/p/synwrite/wiki/python%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -3,21 +3,19 @@

 Plugin type | Meaning
 ------------|--------
-Command plugins | activated by user when clicking (or using a hotkey) of menu item in "Tools -- Plugins" menu
-Auto-completion plugins | activated by "Auto-completion popup" command (Ctrl+Space hotkey)
-Find-id plugins | activated by "Find id" menu item from editor context menu
-
-Planned also later:
-
-* Event plugins - they are activated by SynWrite when some event occurs in editor, e.g. "text changed" or "file saved".
+Command plugins | activated by user when clicking (or using a hotkey) of menu item in "Tools -- Plugins" menu.
+Auto-completion plugins | activated by "Auto-completion popup" command (Ctrl+Space hotkey).
+Find-id plugins | activated by "Find id" menu item from editor context menu.
+Event plugins | activated by SynWrite when some event occurs in editor, e.g. "text changed" or "file saved".

 Method name in Python class should be:

 Plugin type | Method name
 ------------|----------
-Command plugins | `run` or any other (must be specified in SynPlugins.ini file)
-Auto-completion plugins | `complete`
-Find-id plugins | `findid`
+Command plugins | name `run` or any other (must be specified in SynPlugins.ini file)
+Auto-completion plugins | fixed name `complete`
+Find-id plugins | fixed name `findid`
+Event plugins | listed at [py event names] (must be specified in SynPlugins.ini file)

 You can find list of API functions at [python API functions].
 You can find changes-log of API at [python API changes].
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexey T.</dc:creator><pubDate>Mon, 03 Feb 2014 21:44:27 -0000</pubDate><guid>https://sourceforge.net83d8b7b4da59bcf92689a49e151437ca6d1260a4</guid></item><item><title>python API modified by Alexey T.</title><link>https://sourceforge.net/p/synwrite/wiki/python%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -1,8 +1,11 @@
 This page describes API for SynWrite plugins written in Python.
 Currently the following plugin types are supported:

-* Command plugins - they are activated by user when clicking (or using a hotkey) of menu item in "Tools -- Plugins" menu.
-* Find-id plugins - they are activated by usual "Find id" menu item from editor context menu.
+Plugin type | Meaning
+------------|--------
+Command plugins | activated by user when clicking (or using a hotkey) of menu item in "Tools -- Plugins" menu
+Auto-completion plugins | activated by "Auto-completion popup" command (Ctrl+Space hotkey)
+Find-id plugins | activated by "Find id" menu item from editor context menu

 Planned also later:

@@ -10,8 +13,11 @@

 Method name in Python class should be:

-* Command plugins - "run" or any other (must be specified in SynPlugins.ini file).
-* Find-id plugins - "findid".
+Plugin type | Method name
+------------|----------
+Command plugins | `run` or any other (must be specified in SynPlugins.ini file)
+Auto-completion plugins | `complete`
+Find-id plugins | `findid`

 You can find list of API functions at [python API functions].
 You can find changes-log of API at [python API changes].
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexey T.</dc:creator><pubDate>Thu, 30 Jan 2014 20:26:27 -0000</pubDate><guid>https://sourceforge.net3575a76b790641eb535c2b0c6b610789eb29bda8</guid></item><item><title>python API modified by Alexey T.</title><link>https://sourceforge.net/p/synwrite/wiki/python%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -13,5 +13,5 @@
 * Command plugins - "run" or any other (must be specified in SynPlugins.ini file).
 * Find-id plugins - "findid".

-You can find list of all implemented Python API functions at [Plugins Python API functions].
-You can find changes log at [Plugins Python API changes].
+You can find list of API functions at [python API functions].
+You can find changes-log of API at [python API changes].
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexey T.</dc:creator><pubDate>Fri, 24 Jan 2014 19:09:23 -0000</pubDate><guid>https://sourceforge.netb7459109eb305b6bab966829d3abf176fc97422d</guid></item><item><title>Plugins Python API modified by Alexey T.</title><link>https://sourceforge.net/p/synwrite/wiki/Plugins%2520Python%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -2,10 +2,16 @@
 Currently the following plugin types are supported:

 * Command plugins - they are activated by user when clicking (or using a hotkey) of menu item in "Tools -- Plugins" menu.
+* Find-id plugins - they are activated by usual "Find id" menu item from editor context menu.

 Planned also later:

 * Event plugins - they are activated by SynWrite when some event occurs in editor, e.g. "text changed" or "file saved".

+Method name in Python class should be:
+
+* Command plugins - "run" or any other (must be specified in SynPlugins.ini file).
+* Find-id plugins - "findid".
+
 You can find list of all implemented Python API functions at [Plugins Python API functions].
 You can find changes log at [Plugins Python API changes].
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexey T.</dc:creator><pubDate>Sun, 19 Jan 2014 23:11:14 -0000</pubDate><guid>https://sourceforge.net10924ae8c20a174b334a75b4bfaa3b465aadb1ab</guid></item><item><title>Plugins Python API modified by Alexey T.</title><link>https://sourceforge.net/p/synwrite/wiki/Plugins%2520Python%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -7,5 +7,5 @@

 * Event plugins - they are activated by SynWrite when some event occurs in editor, e.g. "text changed" or "file saved".

-You can find list of all implemented Python API functions at [Plugins Python functions].
+You can find list of all implemented Python API functions at [Plugins Python API functions].
 You can find changes log at [Plugins Python API changes].
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexey T.</dc:creator><pubDate>Wed, 25 Dec 2013 18:44:42 -0000</pubDate><guid>https://sourceforge.net6e2858f5963f63ed321cf292f7963072962a8480</guid></item></channel></rss>