diff --git a/mainui/settings/script-editor.md b/mainui/settings/script-editor.md index 2ccf95f5dc..272309b1d2 100644 --- a/mainui/settings/script-editor.md +++ b/mainui/settings/script-editor.md @@ -9,10 +9,34 @@ title: Script Editor The script editor is used everywhere in the UI where some type of configuration file or source code has to be edited. It provides syntax highlighting and auto-completion for code and Item names for multiple languages. -When using the script editor, you might find the following shortcuts useful: +## Keyboard Shortcuts + +The following is a short overview of the most important keyboard shortcuts. +For a full list of available keyboard shortcuts, read the [CodeMirror docs](https://codemirror.net/5/doc/manual.html#commands). + +Mac users should use Cmd instead of Ctrl for most shortcuts. + +Autocompletion & Help: - CtrlSpace: Trigger auto-completion. - CtrlQ: Show documentation (for JavaScript only). + +Copy & Paste: + +- CtrlC: Copy the current line or the current selection. +- CtrlX: Cut the current line or the current selection. +- CtrlV: Paste what has been copied. + +Redo & Undo: + +- CtrlZ: Undo the last change. +- CtrlY: Redo the last change. + +Other: + +- Tab: Indent more. - ShiftTab: Indent less. -- Ctrl/ & Cmd/: Comment/Uncomment the current line. +- CtrlD: Delete the current line. +- Ctrl/: Comment/Uncomment the current line. +- CtrlA: Select all.