Keyboard Shortcuts
These are the default shortcuts available via our open-source code editor component CodeMirror
Note: not all of these have been tested, so please use with caution. If you notice something not working as expected, or out of place, please let us know in Discord.
Function | Windows | Linux | Mac | Notes |
---|---|---|---|---|
Delete Line | ctrl + shift + k | ctrl + shift + k | cmd + shift + k | |
Move Line Up / Down | alt + up or down | alt + up or down | option + up or down | |
Duplicate Line Above / Below | shift + alt + up or down | shift + alt + up or down | shift + option + up or down | |
Cut line | ctrl + x | N/A | cmd + x | |
Cut selection | ctrl + x | ctrl + x | cmd + x | |
Copy line (nothing selected) | ctrl + c | N/A | cmd + c | |
Copy selection | ctrl + c | ctrl + c | cmd + c | |
Paste | ctrl + v | ctrl + v | cmd + v | |
Select rest of line from cursor | ctrl + shift + down | ctrl + shift + down | ctrl + shift + e | |
Delete next character | del | del | ctrl + d | |
Backspace whole word | ctrl + backspace | ctrl + backspace | option + backspace | |
Delete line from cursor | N/A | N/A | ctrl + k | Deletes to end of line from current cursor location. |
Select current line | alt + l | alt + l | ctrl + l | Continuing to press will select the next line down |
Move single char forward | N/A | N/A | ctrl + t | This will take the character directly behind the cursor and move it forward 1 spot for each press. Useful for typos. |
Select single line above starting from cursor | N/A | N/A | ctrl + shift + p | |
Select single line below starting from cursor | N/A | N/A | ctrl + shift + n | |
Backspace line from cursor | N/A | ctrl + shift + backspace | cmd + delete | |
Delete only commented text | alt + backspace | N/A | N/A | This will leave uncommented text untouched |
Toggle line comment | ctrl + / | ctrl + / | cmd + / | |
Toggle block comment | shift + alt + a | shift + alt + a | shift + option + a | |
Open suggestion dropdown | ctrl + space | ctrl + space | ctrl + space | |
Move sidebar to other side of editor | ctrl + shift + x | ctrl + shift + x | N/A | |
Escape button | Esc | Esc | Esc | |
Run Query | ctrl + enter | ctrl + enter | cmd + return | |
Create new line above | N/A | N/A | ctrl + o | |
Indent / outdent line | ctrl + ] or [ | ctrl + ] or [ | cmd + ] or [ | |
Go to matching bracket | ctrl + shift + \ | ctrl + shift + \ | cmd + shift + \ | When cursor is on an open or close bracket (Velocity will show it as green/lightly highlighted) |
Go to beginning of line | Home | Home | fn + left | |
Go to end of line | End | End | fn + right | |
Go to beginning of file | ctrl + Home | ctrl + Home | shift + option + < | |
Go to end of file | ctrl + End | ctrl + End | shift + option + > | |
Collapse / uncollapse region | ctrl + shift + [ or ] | ctrl + shift + [ or ] | cmd + option + [ or ] | When a \/ carrot appears next to the line number, the related query lines can be collapsed |
Search and Replace | ctrl + f | ctrl + f | cmd + f | If user has text highlighted when using this command, it will search for the selection. |
Search for next | ctrl + g | ctrl + g | cmd + g | If user has nothing selected, search bar will pop up. If user has a selection, cursor will jump to next instance. |
Undo cursor move | ctrl + u | ctrl + u | cmd + u | If user clicks somewhere else, this will bring the cursor back to where it just was |
Select next character / grow or shrink selection | shift + right or left | shift + right or left | shift + right or left | User can start a selection or use this shortcut to expand a current selection |
Select next word / block | shift + (ctrl OR alt) + right or left | shift + (ctrl OR alt) + right or left | shift + (ctrl OR alt) + right or left | User can start a selection or use this shortcut to expand a current selection |
Select all | ctrl + a | ctrl + a | cmd + a | |
Go to line prompt | alt + g | alt + g | option + g | |
Move cursor full word / block | ctrl + left or right | ctrl + left or right | option + left or right | |
Last modified 7mo ago