Core block hotkeys (or, how to do work fast)

While the core / pattern is the only critical access pattern to be aware of, it's important to learn the core hotkeys associated with editing, executing, and manipulating blocks to get the most out of our platform. By block, we mean the SQL or Python block specifically.

As a general rule, you'll find that most of these hotkeys are analogous to those you might be familiar with in Jupyter.

HotkeyDescription
esc esc on a block (query or Python) will select the block, enabling you to perform standard text manipulation actions as if the block were text, including: backspace or del to delete the block, cmd + x to cut, cmd + c to copy.
esc then aesc then a on a block will insert a new block above the current block.
esc then besc then b on a block will insert a new block below the current block.
j / kAfter pressing esc on a block to enter command mode, you can use j or k to move up or down to the closest blocks above/below the current one.
ddAfter pressing esc on a block to enter command mode, you can use dd to delete the currently selected block.
cmd + enter

ctrl + enter
cmd (or ctrl) + enter within a block will execute the code in the block, keeping your cursor in place.
shift + entershift + enter within a block will execute the code in the block, then move your cursor to the next block below your current block (or, if no such block exists, create a new block).