1. Developing Gedit plugins - the missing notes
- use gedit.commands.load_uri to load a file (for the "open or display a file" case it's much better than create_tab_from_uri or the like)
- deactivate() is only called if the plugin is deactivated in the Plugin list by the user - if you want to react to window close, connect to the window's "destroy" signal
the API doc on Gedit main page isn't complete - to get an up-to-date list of available functions, open the built-in Python console in Gedit and run help(gedit) for top-level functions (or help(gedit.Panel) or the like to see the rest of the API)
- get the currently-selected text in current document in some window: