Keyboard Shortcuts for Code Editors

To help you work efficiently, Visual Builder supports the following keyboard shortcuts when working with code editors in the Designer (HTML, JSON, JavaScript, and Code view in the Page Designer).

Tab behavior shortcut

To do this: Use this on Mac: Use this on Windows:
Change the code editor's default behavior for the Tab key; pressing Tab adds four spaces in the editor by default Control-Shift-M Ctrl+M

Show Command Palette and Save shortcuts

To do this: Use this on Mac: Use this on Windows:
Show Command Palette F1 F1
Save Command-S Ctrl+S

Basic Editing shortcuts

To do this: Use this on Mac: Use this on Windows:
Cut line if there is no selection; cut selection if there is one Command-X Ctrl+X
Copy line if there is no selection; copy selection if there is one Command-C Ctrl+C
Move line up Option-Up Alt+Up
Move line down Option-Down Alt+Down
Copy line up Shift-Option-Up Shift+Alt+Up
Copy line down Shift-Option-Down Shift+Alt+Down
Delete line Shift-Command-K Ctrl+Shift+K
Insert line below Command-Enter Ctrl+Enter
Insert line above Shift-Command-Enter Ctrl+Shift+Enter
Jump to matching bracket Shift-Command-\ Ctrl+Shift+\
Indent line Command-] Ctrl+]
Outdent line Command-[ Ctrl+[
Go to beginning of line Home or Fn-Left Home
Go to end of line End or Fn-Right End
Go to beginning of file Command-Home Ctrl+Home
Go to end of file Command-End Ctrl+End
Scroll line up Command-Up Ctrl+Up
Scroll line down Command-Down Ctrl+Down
Scroll page up Option-PgUp Alt+PgUp
Scroll page down Option-PgDn Alt+PgDn
Fold (collapse) region Command-Shift-[ Ctrl+Shift+[
Unfold region Command-Shift-] Ctrl+Shift+]
Toggle line comment Command-/ Ctrl+/
Toggle block comment Shift-Option-A Shift+Alt+A
Toggle word wrap Option-Z Alt+Z

Navigation shortcuts

To do this: Use this on Mac: Use this on Windows:
Go to line ... Command-G Ctrl+G
Go to symbol ... Shift-Command-O Ctrl+Shift+O
Go to next error or warning F8 F8
Go to previous error or warning Shift+F8 Shift+F8
Go back Control-- Alt+Left
Go forward Control-Shift-- Alt+Right

Search and Replace shortcuts

To do this: Use this on Mac: Use this on Windows:
Find Command-F Ctrl+F
Replace Option-Command-F Ctrl+H
Find next Command-G F3
Find previous Shift-Command-G Shift+F3
Select all occurrences of Find match Option-Enter Alt+Enter
Add selection to find matches Command-D Ctrl+D

Multi-cursor and Selection shortcuts

To do this: Use this on Mac: Use this on Windows:
Insert cursor Option-Click Alt+Click
Insert cursor above Option-Command-Up Ctrl+Alt+Up
Insert cursor below Option-Command-Down Ctrl+Alt+Down
Undo last cursor operation Command-U Ctrl+U
Insert cursor at end of each line selected Shift-Option-I Shift+Alt+I
Select current line Command-L Ctrl+L
Select all occurrences of current selection Shift-Command-L Ctrl+Shift+L
Select all occurrences of current word Command-F2 Ctrl+F2
Expand selection Control-Shift-Command-Right Shift+Alt+Right
Shrink selection Control-Shift-Command-Left Shift+Alt+Left
Column (box) selection Shift-Option- (drag mouse) Shift+Alt + (drag mouse)

Ctrl+Shift+Alt+(arrow key)

Column (box) selection page up Shift-Option-Command-PgUp Ctrl+Shift+Alt+PgUp
Column (box) selection page down Shift-Option-Command-PgDn Ctrl+Shift+Alt+PgDn

Rich Languages Editing shortcuts

To do this: Use this on Mac: Use this on Windows:
Trigger suggestion Command-Space Ctrl+Space
Format document Shift-Option-F Shift+Alt+F
Go to definition F12 F12
Peek definition Option-F12 Alt+F12
Show references Shift+F12 Shift+F12
Rename symbol F2 F2