
- CUDATEXT DEBUGGER HOW TO
- CUDATEXT DEBUGGER CODE
CUDATEXT DEBUGGER CODE
Param "key" is int key code values are listed in the module cudatext_keys.
on_key(self, ed_self, key, state): Called when user presses a key in editor. Method can return False to disable insertion, other return value is ignored.
on_insert(self, ed_self, text): Called before inserting a text. Pause is CudaText option "py_caret_slow". on_caret_slow(self, ed_self): Called after caret position/selection is changed, and small pause is passed. on_caret(self, ed_self): Called after caret position/selection is changed. Pause is CudaText option "py_change_slow". on_change_slow(self, ed_self): Called after editor text is changed, and small pause is passed. on_change(self, ed_self): Called after editor text is changed. on_tab_move(self, ed_self): Called after closing a tab (another tab is already activated), or moving a tab (by drag-n-drop, or UI command). on_tab_change(self, ed_self): Called after active tab is changed. This event is not sent to all plugins, but only to the single specified plugin. on_cli(self, param1, param2.): Called when application gets command-line parameter "-p=cuda_pluginname#param1#param2.". on_app_deactivate(self, ed_self): Called when application window looses focus. on_app_activate(self, ed_self): Called when application window gets focus. This event is lazy, ie it's called only for already loaded plugins. on_exit(self, ed_self): Called on exiting application. on_start(self, ed_self): Called once on program start. on_delete_file(self, ed_self, filename): Called on running command "File / Close and delete file". Method must return valid filename string or None. on_save_naming(self, ed_self): Called before saving untitled tab, to get suggested filename without path and extension. Method can return False to disable saving, other value is ignored. on_save_pre(self, ed_self): Called before saving file. on_save(self, ed_self): Called after saving file. on_close(self, ed_self): Called before closing tab, after modified file was saved, and editor is still active. Method can return False to disable closing. on_close_pre(self, ed_self): Called before closing tab, before checking if tab modified or not. on_open_none(self, ed_self): Called after file is opened, and none lexer was detected/set for it. Method can return False to disable opening, other value is ignored. on_open_pre(self, ed_self, filename): Called before file opening. on_open(self, ed_self): Called after file is opened from disk. Usually the False return value blocks propagation of event to other plugins, so don't return False if not necessary. See description of action PROC_SET_EVENTS in app_proc().Įvent handlers (Command.on_nnnnn methods) return-value is ignored is many cases, but sometimes return value True or False has special meaning. Run-time subscribing/unsubscribing via API. File "plugins.ini" is read on plugins initialization, so after writing there, CudaText should be restarted. File "plugins.ini" section can contain lines like "cuda_modulename=event1,event2.".
This is used when plugin doesn't need some events initially, but after changing some options, it needs more events. Static subscribing via config file "settings/plugins.ini".This is used, when plugin needs to always react to some events, with any combination of its options. Plugin can subscribe to events in several ways: command "Save all tabs" calls event "on_save" for passive tabs. This object is the same as object "ed" in most cases ("ed" always refers to focused editor), but in some cases event occurs in inactive editor, e.g. Event methods have param "ed_self": this is Editor object in which event occurred. For example, method "Command.on_save" will be called by program event "on_save" - if plugin is subscribed to that event. To make plugin react to some program event, add method to class Command. Helper functions for plugins which use Node.js. Constants, functions, class Editor, objects of class Editor. 10.4 Show me the template of complex plugin with side-panel and bottom-panel.
CUDATEXT DEBUGGER HOW TO
10.3 How to make auto-completion plugin.10.2 How plugin can show tooltips on mouse-over.8.3 Format of text for cmd_FinderAction.4.32.2 menu_proc - Command for new items.4.20.8 dlg_proc - Signatures of event callbacks.4.20.7 dlg_proc - Control events - for editor control.4.20.6 dlg_proc - Control events - for specific controls.4.20.5 dlg_proc - Control events - general.4.19.2 dlg_custom - Properties of controls.4.3.14 app_proc - Show/Hide/Undock UI elements.