How to customize top menu and context menu
Plugin "Configure Menu" (in Addon Manager) allows to change top menu and context menu. Plugin can create file (settings/menu.json) with default menu configuration, which you edit to customize all menus. File has items like:
- ,{"cap":"&Save", "cmd":"cmd_FileSave"}
How to add here built-in commands? See identifiers of CudaText commands in the file "py/cudatextcmd.py", they have prefixes cCommand (low level commands) and cmd_ (high level commands). For example, cmd_FileSave is the command to save current file.
How to add here plugin commands? For example, you have plugin "Comments", it is in the folder "py/cuda_comments". See plugin's file install.inf, and there find needed Python functions names. Then write item like this:
- ,{"cap":"Toggle line comment", "cmd":"module=cuda_comments;cmd=cmt_toggle_line_body;"}
Here "cuda_comments" is folder name, and "cmt_toggle_line_body" is Python function from install.inf.