openhab-docs/mainui/settings/script-editor.md

1.5 KiB

layout title
documentation Script Editor

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.

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.

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.
  • CtrlShiftK: Delete the current line or selection.
  • Ctrl/: Comment/Uncomment the current line.
  • CtrlA: Select all.