How to use Keyboard Shortcuts in SQL Model

Minimal Must-Knows

International KeyboardDescriptionMacWindows
See all shortcutsFind all shortcuts - you can also execute them directly(fn + ) F1(fn + ) F1
UndoGoes one step backCMD + ZCTRL + Z
RedoGoes one step furtherCMD + YCTRL + Y
Multi-Line CommentingComments the line or selected textCMD + /CTRL + /
Toggle Block CommentInserts block comments /* */
If you select text it puts the selected text inside block comments
Option + Shift + AALT + Shift + A
SearchOpens the option to find and search for a matching text in the editorCMD + FCTRL + F
Run QueryRun either all the code or just the selected partCMD + EnterCTRL + Enter
Format QuerySelect and format a query nicelyCMD + Shift + FCTRL + Shift + F
Multi-CursorVery useful to write multiple lines at the same timeOption + Shift + MouseALT + Shift + Mouse

Essentials

International KeyboardDescriptionMacWindows
ReplaceOpens the Find and Replace editorCMD + HCTRL + H
Find NextFinds the next occurrence of the searchEnter
or
CMD + F3
Enter
or
CMD + F3
Find PreviousFinds the previous occurrence of the searchShift + Enter
or
Shift + CMD + F3
Shift + Enter
or
Shift + CMD + F3
Move lineMove a line up and down without copyingOption + ArrowALT + Arrow
Duplicate LineDuplicates the line or selection where the cursor is placedOption + Shift + ArrowALT + Shift + Arrow
Add Cursor DownAdds a new cursor one line belowCMD + Option + Arrow DownCTRL + ALT + Arrow Down
Add Cursor UPAdds a new cursor one line upCMD + Option + Arrow UpCTRL + ALT + Arrow Up
Add the next occurrence in the selectionIf the text it repeated it adds anytime an occurrence in the selectionCMD + DCTRL + D
Find/change all occurrencesHighlights text matching the selected keyword, you can as a next step edit those simultaneouslyCMD + F2 + Mouse Left ClickCTRL + F2 + Mouse Left Click
Delete LineDeletes the current lineCMD + Shift + KCTRL + Shift + K
Indent LineIndents the LineCMD + ]CTRL + ]
Out Indent LineOut indents the LineCMD + [CTRL + [
Go to line columnGoes directly to the line column you specifyCMD + GCTRL + G
Select All the textSelects all the textCMD + ACTRL + A
Trigger suggestAds suggestion popupCMD + SpaceCtrl + Space

Advanced

Select All occurrences

Another way of selecting multiple blocks of text with multiple cursors is Select All Occurrences command, which selects all the other occurrences in the current file of the already selected text. In case no text is selected/clicked, the closest word to the current cursor is selected.

This command can be triggered by

  • Ctrl + F2 on Linux or Windows
  • CMD + F2  on Mac.
International KeyboardDescriptionMacWindows
Add cursor to line endsAdds cursors where to line endsShift + Option + IShift + ALT + I
Cursor UndoUndoes the last cursor movementCMD + UCTRL + U
Expand selectionExpands the text selectionShift+Option+ RightArrowShift+ALT+ RightArrow
Shrink selectionShrinks the text selectionShift+Option+ LeftArrowShift+ALT+ LeftArrow
Go to BracketPositions the cursor where the Bracket isCMD + SHIFT + \CTRL + SHIFT + \
Go to Next Problem in Files (Error Warning Info)F8F8
Go to Previous Problem in Files (Error Warning Info)Shift + Option + F8Shift + ALT + F8
Insert Line AboveInserts Line AboveCTRL+ SHIFT + EnterCMD + SHIFT + Enter
Replace with next ValueCTRL + SHIFT + .CTRL + SHIFT + .
Replace with Previous ValueCTRL + SHIFT + ,CTRL + SHIFT + ,
Toggle Tab Key Moves FocusCTRL + MCMD + M
Trim trailing White-spaceCMD + K
or
CMD + X
CTRL + K
or
CTRL+ X
Show all occurrences of find matchCMD + Shift + LCTRL + Shift + L
Show accessibility helpOpens informative popupOption + F1ALT + F1
Show editor context menuShift + F10Shift + F10

Additional Shortcuts

CommandsDescription
Add Cursors to topAdd cursors ti the end of every line above the cursor
Add Cursors to bottomAdd cursors ti the end of every line below the cursor
Add selection to previous find matchPlaces the cursor to every matching word/phrase to the one selected text
Convert indentation to spaces
Convert indentation to Tabs
Copy with syntax highlighting
Cursor Redo
Delete all leftDeletes all text or space in the left of the cursor
Delete all rightDeletes all text or space in the right of the cursor
Delete wordDeletes the word where the cursor is placed
Detect indentation form ContentDetects indentation form Content
Developer: Force Retokenize
Developer: Inspect tokensOpens an inspector everywhere you put the cursor
Find with selectionOpens the Find panel with the selection ready for search
Duplicate selectionCopies and Pastes the selection already made
Editor Font Zoom inZooms in the font
Editor Font Zoom outZooms out the font
Edit font zoom resetResets the font to its default state
Indent using spacesIndents using spaces
Indent using tabsIndents using tabs
Insert line belowInserts line below
Join LineJoins 2 Lines together
Move last selection to previous find match
Move selected text left
Move selected text right
Open LinkOpens selected link in a new tab
Re-indent selected linesRe-indents selected lines
Reset Suggest widget sizeReset Suggest widget size
Select to bracketSelects text inside the bracket
Sort lines AscendingSorts selected lines ascending
Sort lines DescendingSorts selected lines descending
Toggle High contrast themeChanges the color of the editor into a high contrast theme (black)
Transform to lowercaseTransform selected text to lowercase
Transform to title-caseCapitalizes the first letter of the word
Transform to uppercaseTransforms all the letters into upper case
Transpose letters
Trigger inline suggestion