Keyboard reference

funcional

Every notebook shortcut: running cells, command mode, selecting, copying, undoing and moving cells, find, bookmarks, presenting, and how to change them.

Notebooks have two keyboard modes, the same idea as Jupyter's. While you type in a cell's editor, keys type text and only the run shortcuts act on cells. Press Esc and the notebook switches to command mode: the selected cell gets an outline and single keys move between cells, insert, delete and convert them. Press Enter to go back to editing.

Lendo as tabelas: ⌘ é Ctrl e ⌥ é Alt on Windows and Linux. Every notebook command is also in the command palette (⌘⇧P / Ctrl+Shift+P) under Notebook:, so you can run any of them without a shortcut.

Running cells

These work from anywhere in the notebook, including inside a cell's editor.

AçãomacOSWindows / Linux
Run the selected cell⌘ReturnCtrl+Enter
Run the cell and select the next one⇧ReturnShift+Enter
Run the cell and insert a new cell below⌥ReturnAlt+Enter
Run all cells⌘⇧ReturnCtrl+Shift+Enter
Stop the runNo default key: use Parar in the top bar, Query ▸ Stop Notebook Run, or the palette's Notebook: Stop Run, and bind a key if you want one.

What "run the cell" includes depends on the run mode switch in the top bar (this cell only, or the cell and its out-of-date inputs). See Running notebooks.

Command mode

Esc inside a cell editor first closes whatever the editor has open (a completion list, a find bar); press it again to enter command mode. Command-mode keys only fire while the notebook itself has focus, so they can never land in your SQL.

ChaveAção
J ou ↓Select the next cell
K ou ↑Select the previous cell
AInsert a cell above
BInsert a cell below
EuOpen the insert menu: pick any kind of cell with J/K or the arrows, Enter to insert it below, Esc to close
D DDelete the selected cells (the toast's Desfazer is the same step as Z)
MTurn the selected cells into Markdown
YTurn the selected cells into SQL
OCollapse or expand the selected cells
EEmbed the selected cells' outputs, or show them in full again (see Embedded outputs)
PPin or unpin the selected cells' outputs in the strip above the cells
EnterEdit the selected cell
SQLly
A notebook in command mode with one cell outlinedA notebook in command mode with one cell outlined
Command mode: the selected cell carries the accent outline, and single keys act on cells.

Selecting cells

Most command-mode keys act on every selected cell, not only the active one. With two or more cells selected, a bar above the cells offers Run, Copy, Cut, Duplicate, Move up, Move down, Collapse, To Markdown, To SQL, Merge, Bookmark, Delete and Clear selection.

AçãomacOSWindows / Linux
Extend the selection down⇧J ou ⇧↓Shift+J ou Shift+Down
Extend the selection up⇧K ou ⇧↑Shift+K ou Shift+Up
Select every cell⌘ACtrl+A
Select a range / add or remove one cell⇧-click / ⌘-clickShift-click / Ctrl-click
Clear the selection (closes the insert menu, then the find bar, first)Esc
Run the selected cells⌘⌥ReturnCtrl+Alt+Enter
SQLly
Notebook with several cells selected and the bulk action bar above themNotebook with several cells selected and the bulk action bar above them
Three cells selected: the bar above the cells acts on all of them at once.

Copy, paste, undo and reorder

These are command-mode keys. Inside a cell's editor, ⌘C, ⌘X, ⌘V e ⌘Z stay the editor's own text commands.

AçãomacOSWindows / Linux
Copy the selected cellsC ou ⌘CC ou Ctrl+C
Cut the selected cellsX ou ⌘XX ou Ctrl+X
Paste below / aboveV ou ⌘V / ⇧VV ou Ctrl+V / Shift+V
Duplicate the selected cells⌘DCtrl+D
Undo a change to the cellsZ ou ⌘ZZ ou Ctrl+Z
Refazer⇧Z ou ⌘⇧ZShift+Z ou Ctrl+Shift+Z
Move the selected cells up / down⌥↑ / ⌥↓Alt+Seta para cima / Alt+Seta para baixo
Merge with the next cell (or merge the selection)⇧MShift+M
Split the cell at the cursor (inside a SQL or Markdown cell's editor)⌘⇧-Ctrl+Shift+-
  • Copied cells paste into the same notebook or another one with new ids, names that don't clash (orders se torna orders_2) e {{…}} references pointing at the pasted copies. Other apps get the copy as a SQL script (when every cell is SQL) or as Markdown with the SQL in code blocks. SQL text pasted into a notebook becomes one cell per statement. Pasted and duplicated cells always start read-only, even copies of a cell that was allowed to change data.
  • Desfazer covers inserting, deleting, moving, pasting, renaming, converting, changing a cell's settings or connection, find and replace, embedding outputs and AI changes, up to 200 steps per tab. Typing inside a cell stays with that editor's own undo, and undoing a step keeps what you typed since in the cells the step didn't touch. Undo is refused while cells run, and the history is kept only while the tab is open.
  • Arraste a cell, or the whole selection, by the handle at the left of its header; a line shows where it will land and the list scrolls when you reach its edge.
  • Merge with previous has no default key: use the cell menu or the palette's Notebook: Merge Cell with Previous.
SQLly
A notebook cell being dragged with a drop line between two other cellsA notebook cell being dragged with a drop line between two other cells
Dragging a cell by its handle: the accent line shows where it will land.

Find, bookmarks, folds and pins

AçãomacOSWindows / Linux
Find in the notebook⌘FCtrl+F
Find and replace⌘⇧HCtrl+Shift+H
Next / previous match (in the find field)Enter / Shift+Enter
Bookmark the selected cells, or remove their bookmarks⌘F2Ctrl+F2
Next / previous bookmark (wraps around)F2 / ⇧F2F2 / Shift+F2
Fold or unfold a Markdown heading's section⌘⌥[Ctrl+Alt+[
Pin or unpin the selected cells' outputsP
  • Localizar searches SQL and Markdown, cell names, the notebook title and the text in cell settings such as chart titles, captions and dashboard tile notes, with Match case e Whole word. O Search results switch also looks in the rows each cell's result holds (found, never replaced, up to 5,000 matches). Substituir e Replace all are one undo step each; renaming a cell this way updates the cells that refer to it. AI cells are searched but never replaced. There are no regular expressions.
  • Bookmarks show a Bookmarked badge in the cell header and are listed on the left rail's Bookmarks aba (Notebook: Show Bookmarks opens it).
  • Folding a Markdown heading hides the cells up to the next heading of the same or a higher level; going to a hidden cell unfolds it. Notebook: Unfold All Sections has no default key.
  • Pinned outputs sit in a strip above the cells (up to six): the cell's name, state, its first rows and row count, with Go to and Unpin.

Bookmarks, folds and pins are saved in the file, but they never count as an edit to a trusted notebook.

SQLly
Notebook find bar with a replace field and a list of matchesNotebook find bar with a replace field and a list of matches
Find and replace across the notebook: matches in SQL, Markdown and a chart title, with the match list.
SQLly
Notebook left rail on the Bookmarks tabNotebook left rail on the Bookmarks tab
The Bookmarks tab on the left rail, and the Bookmarked badge on a cell header.

While you type

  • Digitando {{ in a SQL cell lists the other cells and param.; {{param. lists the parameters (and start, end e end_exclusive of a date range). After FROM {{orders}} o, typing o. offers that cell's columns, from its result or, before it has run, from its query. Hovering over a reference shows the cell's kind, state and columns.
  • Digitando / at the start of a line in a Markdown cell opens the slash menu: headings, lists, a checklist, a table, a callout, a quote, a divider, a code block, bold, italic, inline code, a link, a picture, a formula value or parameter, or a new cell of any kind below. Ctrl+Espaço offers the same snippets anywhere in the cell.
  • In a Markdown cell, {{ lists only formula values and parameters, each with its current value (sensitive ones hidden), and there is no SQL completion. Enter on a list item starts the next item and on an empty item ends the list; Aba / ⇧Tab nest and un-nest the item; brackets, backticks and emphasis marks close themselves. See Writing in a Markdown cell.
SQLly
Completion list of notebook cell names in a SQL cellCompletion list of notebook cell names in a SQL cell
Typing {{ in a SQL cell lists the cells it can read, with each one's kind and state.
SQLly
Markdown cell with the slash menu openMarkdown cell with the slash menu open
The slash menu in a Markdown cell.

Dashboard viewer and presentation

While a dashboard is presented full screen (see Dashboards and presentation):

ChaveAção
→, ↓, Espaço ou Página para BaixoPróximo slide
←, ↑, ⇧Space ou Página para CimaSlide anterior
Início / EndFirst / last slide
EscLeave the presentation (also leaves the dashboard viewer)

Changing a shortcut

Notebook shortcuts are ordinary keybindings: change them in Settings ▸ Workspace ▸ Keyboard Shortcuts like any other command (see Atalhos de teclado personalizáveis). The command-mode keys are bound only in command mode, so binding a single letter there does not affect typing. Commands with no default key, such as Notebook: Embed All Outputs, Notebook: Show or Hide Embedded Configuration, Notebook: Show Bookmarks e Notebook: Unfold All Sections, can be given one there.