Code Editor supports the following shortcuts:

Escape
Show Completions
Tab
Insert Indent (depending on the preference of tabs or spaces)

Command + N
New Document Tab
Command + W
Close Tab
Command + S
Save
Command + Z
Undo
Command + Shift + Z
Redo

Command + A
Select All
Command + X
Cut
Command + C
Copy
Command + V
Paste

Command + F
Find
Command + G
Find Next
Command + Shift + G
Find Previous

Command + /
Toggle Comment
Command + [
Indent Selection
Command + ]
Dedent Selection

Command + Shift + [
Move to previous tab
Command + Shift + ]
Move to next tab

Command + 4
Toggle Preview (Editor only)
Command + K
Clear Scrollback (Terminal and Playgrounds only)

Command + R
Reload (Preview only)
Command + Left Arrow
Back (Preview only)
Command + Right Arrow
Forward (Preview only)

Shift + Left Arrow
Select the previous character
Shift + Right Arrow
Select the next character

Command + Left Arrow
Move to the beginning of current line
Command + Right Arrow
Move to the end of current line
Command + Shift + Left Arrow
Select to the beginning of current line
Command + Shift + Right Arrow
Select to the end of current line

Option + Left Arrow
Move to the beginning of the current word
Option + Right Arrow
Move to the end of the current word
Option + Shift + Left Arrow
Select to the beginning of the current word
Option + Shift + Right Arrow
Select to the end of the current word

Command + Delete
Delete to the beginning of the current line
Command + Option Delete
Delete to the beginning of the current word
Command + Forward Delete
Delete to the end of the current line
Command + Option + Forward Delete
Delete to the end of the current word

Control + A
Move to the beginning of the current line
Control + Shift + A
Select to the beginning of the current line
Control + E
Move to the end of the current line
Control + Shift + E
Select to the end of the current line
Control + K
Delete to the end of the current line

This article was last updated on October 4, 2019