Using Keyboard Shortcuts in the Script Editor

When you work in the script editor, you can use keyboard shortcuts to simplify your work.

The following keyboard shortcuts are available in the script editor:
Command Keyboard Shortcut Description
selectAll CTRL + A Select the whole content of the editor.
deleteLine CTRL + D Delete the whole line under the cursor, including newline at the end.
saveApplication CTRL + S Save the whole application.
singleSelection ESC When multiple selections are present, this deselects all but the primary selection.
undo CTRL + Z Undo the last change.
redo CTRL + Y Redo the last undone change.
undoSelection CTRL + U Undo the last change to the selection, or if there are no selection-only changes at the top of the history, undo the last change.
redoSelection ALT + U Redo the last change to the selection, or the last text change if no selection changes remain.
goDocStart CTRL + Home Move the cursor to the start of the document.
goDocEnd CTRL + End Move the cursor to the end of the document.
goLineStart ALT + Left Move the cursor to the start of the line.
goLineStartSmart Home Move to the start of the text on the line, or if we are already there, to the actual start of the line (including whitespace).
goLineEnd ALT + Right Move the cursor to the end of the line.
goGroupLeft CTRL + Left Move to the left of the group before the cursor. A group is a stretch of word characters, a stretch of punctuation characters, a newline, or a stretch of more than one whitespace character.
goGroupRight CTRL + Right Move to the right of the group after the cursor. A group is a stretch of word characters, a stretch of punctuation characters, a newline, or a stretch of more than one whitespace character.
delCharBefore SHIFT + Backspace Delete the character before the cursor.
delCharAfter Delete Delete the character after the cursor.
delGroupBefore CTRL + Backspace Delete to the left of the group before the cursor.
delGroupAfter CTRL + Delete Delete to the start of the group after the cursor.
indentAuto SHIFT + Tab Auto-indent the current line or selection.
find CTRL + F Find.
findNext CTRL + G Find next.
findPrev SHIFT + CTLR + G Find previous.
toggleComments CTRL + # (Microsoft Windows), CMD + / (Mac OS) Toggles between commenting and uncommenting the selected lines.