Documentation Home
MySQL Shell for VS Code


Pre-General Availability: 2023-01-18

B.1 Command Palette

MySQL Shell editors use some of the editing features included in Visual Studio Code Command Palette. These features enable you to be highly productive when editing code blocks.

The default Command Palette displays the available commands based on your current context. To view the Visual Studio Code Command Palette, use F1.

Command Description and Keyboard Shortcut
Command Palette To view the Command Palette, use the keyboard shortcut:

F1.

Issue Code Block To issue the code block, use the keyboard shortcut:

Shift+Enter.

Copy To copy the selected code block, use the keyboard shortcut:

Ctrl+C.

Cut To cut the selected code block, use the keyboard shortcut:

Ctrl+X.

Paste To paste the copied code block, use the keyboard shortcut:

Ctrl+V.

Add Cursor Above To add a cursor above in MySQL Shell Consoles to enable mass-edit mode, use the keyboard shortcut:

Ctrl+Alt+UpArrow.

Add Cursor Below To add a cursor below in MySQL Shell Consoles to enable mass-edit mode, use the keyboard shortcut:

Ctrl+Alt+DownArrow.

Add Cursor to Line Ends To add a cursors to the end of the lines, use the keyboard shortcut:

Shift+Alt+l.

Undo Last Cursor Operation To undo the last cursor operation, use the keyboard shortcut:

Ctrl+U.

Select All Occurrences of the Current Selection To select all occurrences of the current selection, use the keyboard shortcut:

Shift+Ctrl+l.

Select All Occurrences of the Current Word To select all occurrences of the current word, use the keyboard shortcut:

Ctrl+F2.

Expand Selection Area To expand an area of selection, use the keyboard shortcut:

Shift+Alt+RightArrow.

Decrease Selection Area To decrease an area of selection, use the keyboard shortcut:

Shift+Alt+LeftArrow.

Paste Copied Selection Above To paste a copied selection above, use the keyboard shortcut:

Shift+Alt+UpArrow.

Paste Copied Selection Below To paste a copied selection below, use the keyboard shortcut:

Shift+Alt+DownArrow.

Trigger Suggestion To trigger suggestions for the code block, use the keyboard shortcut:

Ctrl+Space.

Note

The suggestions displayed are not MySQL specific.

Trim Trailing Whitespaces To trim trailing use whitespaces, use the keyboard shortcut:

Ctrl+K, then Ctrl+X.

Find To find a string in the GUI Console, use the keyboard shortcut:

Ctrl+F.

Replace To replace a string in the GUI Console, use the keyboard shortcut:

Ctrl+H.

Select All Occurrences of the Find Match To select all occurrences of the Find match, use the keyboard shortcut:

Alt+Enter.

Format Document To format the code block, use the keyboard shortcut:

Alt+Shift+F.

Delete Line To delete the current line in the code block, use the keyboard shortcut:

Ctrl+Shift+K.

Insert Line Above To insert a line above the current line in the code block, use the keyboard shortcut:

Ctrl+Shift+Enter.

Indent Line To indent a line, use the keyboard shortcut:

Ctrl+].

Outdent Line To outdent a line, use the keyboard shortcut:

Ctrl+[.

Jump to the Matching Bracket To jump to the matching bracket in the code block, use the keyboard shortcut:

Ctrl+Shift+\.

Go to the Beginning of the GUI Console To go to the beginning of the GUI Console, use the keyboard shortcut:

Ctrl+Home.

Add a Comment Line To add a comment line or change a line to a comment line, use the keyboard shortcut:

Ctrl+K, then Ctrl+C.

Remove a Comment Line To remove comment line or change a line from a comment, use the keyboard shortcut:

Ctrl+K, then Ctrl+U.

The keyboard shortcuts can be customized by using Ctrl+K, then Ctrl+S.

Search for the keyboard shortcuts and add your custom keybindings to the keybindings.json.