Editor Commands

A list of all the commands available in the Editor.

If you're working in the Editor and press CMD SHIFT P (on Mac) or CTRL SHIFT P (on Windows), the command palette will appear with the Editor commands easily accessible. If you want access to other command palette tools, simply back out the Editor Commands preface. If the editor commands don't show by default, start typing "Editor Commands" until the category appears on screen, and then press Enter to bring them up.

Up close silent video of the command palette. At the top is an editable text field labeled "Type a command or search". In this the user types "Editor Commands", and then presses Enter. "Editor Commands" is added to a block in the search bar. The list of options below is replaced with a new set of Editor specific commands.
Screen recording showing the command palette with editor commands

CommandDescriptionShortcut
FindOpens up the find widget
CMD/CTRL F
ReplaceOpens up the find / replace widget
CMD/CTRL OPTION F
Find With SelectionOpens up the find widget with the current selection filled in
Find NextJumps the next instance of the search query
CMD/CTRL G
Find PreviousJumps the previous instance of the search query
CMD/CTRL SHIFT F
Find Next SelectionJumps the next instance of the selected text
Find Previous SelectionJumps the previous instance of the selected text

Quick editing

CommandDescriptionShortcut
Copy Line UpCopies the current line to a new line above
SHIFT OPTION
Copy Line DownCopies the current line to a new line below
SHIFT OPTION
Duplicate SelectionInserts a new copy of the current selected text
Move Line UpMoves the current line to the line above
Move Line DownMoves the current line to the line below
Sort Lines AscendingSorts the currently selected lines alphanumerically, ascending
Sort Lines DescendingSorts the currently selected lines alphanumerically, descending
Trim Trailing WhitespaceRemoves whitespace from the end of the selection
Delete LineDeletes the current line
CMD/CTRL SHIFT K
Indent LineAdds a tab at the beginning of the line
CMD/CTRL ]
Outdent LineRemoves a tab at the beginning of the line
CMD/CTRL [
Insert Line AboveAdds a blank line above the current line without moving the cursor
CMD/CTRL Enter
Insert Line BelowAdds a blank line below the current line without moving the cursor
CMD/CTRL SHIFT Enter
Delete All LeftDeletes all text to the left of the cursor on the current line
CMD/CTRL Backspace
Delete All RightDeletes all text to the right of the cursor on the current line
CTRL K
Delete WordDeletes the current word
Join LinesCombines the selected lines to be on a single line
CTRL J
Transform to UppercaseConverts the selected text to be uppercase
Transform to LowercaseConverts the selected text to be lowercase
Transform to Title CaseConverts the selected text to be title case
Transform to Snake CaseConverts the selected text to be snake case
Format DocumentFormats the entire document in the editor
SHIFT OPTION F

Selection

CommandDescriptionShortcut
RenameWhen your cursor is inside an HTML element tag name, this allows you to rename the open and closing tag at the same time
Expand SelectionExpand the current selection to the next selectable range
Shrink SelectionShrinks the current selection to the previous selectable range
Add Selection To Next Find MatchInserts a cursor and selects the next instance of the search query or selected text
CMD/CTRL D
Add Selection To Previous Find MatchInserts a cursor and selects the previous instance of the search query or selected text
Move Last Selection To Next Find MatchSelects the next instance of the search query or selected text
Move Last Selection To Previous Find MatchSelects the previous instance of the search query or selected text
Select All Occurrences of Find MatchSelects all matches of the search query or selected text
Select to BracketExpands the current selection to the next set of brackets

Cursor

CommandDescriptionShortcut
Add Cursor AboveInserts a cursor on the line above
CMD/CTRL OPTION
Add Cursor BelowInserts a cursor on the line below
CMD/CTRL OPTION
Add Cursors To BottomInserts a cursor on every line until the bottom
Add Cursors To TopInserts a cursor on every line until the top
Cursor UndoRemoves the latest cursor inserted
Cursor RedoRe-inserts the latest cursor removed

Fold

CommandDescriptionShortcut
FoldFolds the innermost uncollapsed region at the cursor
CMD/CTRL OPTION [
UnfoldUnfolds the collapsed region at the cursor
CMD/CTRL OPTION ]
Fold RecursivelyFolds the innermost uncollapsed region at the cursor and all regions inside that region
Unfold RecursivelyUnfolds the region at the cursor and all regions inside that region
Fold AllFolds all regions in the editor
Unfold AllUnfolds all regions in the editor
Fold All Block CommentsFolds all block level comments in the editor
Fold All Regions Except SelectedFolds all regions, except the region at the current cursor position
Unfold All Regions Except SelectedUnfolds all regions, except the region at the current cursor position
Toggle FoldFolds or unfolds the region at the cursor
Fold Level XFolds all regions of level X (1-7), except the region at the current cursor position

Other

CommandDescriptionShortcut
Open LinkWhen your cursor is inside of a URL this command will open the link in a new tab
Toggle Tab Key Moves FocusToggles whether when Tab is pressed, a tab character is inserted or the focus moves to from the editor to the next item in the app
Go to BracketJumps to the next closing tag or bracket
Copy With Syntax HighlightingCopies the selected text to your clipboard with syntax highlighting
Toggle Line CommentToggles a single line comment
CMD/CTRL /
Toggle Block CommentToggles a multi-line comment
SHIFT OPTION A
Show Editor Context MenuShows the context menu, the same menu displayed on right click
Go to Next ProblemJumps to the next problem highlighted in your code
Go to Previous ProblemJumps to the previous problem highlighted in your code
Quick Fix...Fixes the currently focused problem if an automated solution is available
Go to Line/Column...Jumps to the specified line and column
Trigger SuggestShows suggestions for the current cursor position
Show HoverShows the hover widget for the current cursor position