Keybindings & Actions
The actions Suzuri adds, their default bindings, and how to rebind them.
Every Suzuri feature is a named action, reachable from the command palette (Cmd+Shift+P) and bindable like any other.
The Document menu
The menu bar's Document menu, between Run and Window, collects the actions that work on the current note or file, each with its shortcut.
| Item | Action |
|---|---|
| Format → Heading 1 to Heading 6, Body | markdown::ToggleHeading1 to ToggleHeading6, markdown::ClearHeading |
| Format → Bold, Italic, Strikethrough, Inline Code | markdown::ToggleBold, ToggleItalic, ToggleStrikethrough, ToggleInlineCode |
| Format → Link | markdown::InsertLink |
| Insert Citation… | citations::InsertCitation |
| Open Citation Source | citations::OpenSource |
| Export → PDF, Word, HTML, LaTeX, EPUB | markdown_export::ExportTo* |
Export is also under File. An item is greyed out when it cannot apply to the current file: Format outside markdown notes, Insert Citation in a file that is not saved in the project, Open Citation Source unless the cursor is on a cite key, and Export unless the current tab is a saved markdown note.
Suzuri actions
| Action | Default (macOS) | What it does |
|---|---|---|
markdown::ToggleLivePreview | — | Toggles live preview in the current markdown buffer. |
markdown::ToggleBold | Cmd+B in markdown notes | Makes the selection or word under the cursor bold, or removes it. |
markdown::ToggleItalic | Cmd+I in markdown notes | Makes the selection or word italic, or removes it. |
markdown::ToggleStrikethrough | — | Strikes through the selection or word, or removes it. |
markdown::ToggleInlineCode | — | Formats the selection or word as inline code, or removes it. |
markdown::InsertLink | — | Turns the selection into a link, or a link back into its text. |
markdown::ToggleHeading1 to ToggleHeading6 | Cmd+Alt+1 to 6 in markdown notes | Makes the lines in the selection a heading of that level, or body text if they already are one. |
markdown::ClearHeading | Cmd+Alt+0 in markdown notes | Turns the headings in the selection back into body text. |
citations::InsertCitation | Cmd+Alt+C | Searches the vault library and Zotero, and inserts a citation at the cursor. |
citations::OpenSource | Cmd+Alt+O | Opens the PDF behind the cite key under the cursor, in a split. |
typeset_preview::OpenLivePreview | — | Previews the current file: Typst and LaTeX compile to a PDF in a split; HTML opens in the browser. |
markdown_export::ExportToPdf | — | Exports the current markdown note to a PDF beside it and opens it in a split. |
markdown_export::ExportToDocx | — | Exports the current markdown note to a Word document beside it. |
markdown_export::ExportToHtml | — | Exports the current markdown note to a self-contained HTML file. |
markdown_export::ExportToLatex | — | Exports the current markdown note to LaTeX source. |
markdown_export::ExportToEpub | — | Exports the current markdown note to an EPUB. |
typeset_preview::OpenLivePreview also has a Preview button in the toolbar
for .typ and .tex files, and an entry in the project panel's context menu.
PDF viewer
These apply while a PDF tab has focus.
| Action | Default (macOS) |
|---|---|
pdf_viewer::ZoomIn | Cmd+= |
pdf_viewer::ZoomOut | Cmd+- |
pdf_viewer::ResetZoom | Cmd+0 |
pdf_viewer::ZoomToActualSize | Cmd+1 |
pdf_viewer::FitToView | Cmd+Shift+0 |
pdf_viewer::CopyDocumentText | Cmd+C |
On Windows and Linux, substitute Ctrl for Cmd.
Widget keys
Inside a table cell:
| Key | Effect |
|---|---|
| Tab | Commit and move to the next cell; from the last cell, return to the buffer |
| Enter | Commit and return to the buffer |
| Esc | Discard the edit and return to the buffer |
With table cells, a row, or a column selected:
| Key | Effect |
|---|---|
| Cmd+C | Copy as tab-separated text |
| Cmd+X | Copy, then empty the cells (or remove the row or column) |
| Delete / Backspace | Empty the cells (or remove the row or column) |
| Esc | Clear the selection |
Rebinding
Keymaps live in ~/.config/suzuri/keymap.json. Open it with
zed: open keymap from the command palette.
[
{
"context": "Editor && mode == full",
"bindings": {
"cmd-e": "markdown::ToggleLivePreview",
"cmd-shift-b": "typeset_preview::OpenLivePreview"
}
},
{
"context": "PdfViewer",
"bindings": {
"cmd-shift-c": "pdf_viewer::CopyDocumentText"
}
}
]Zed's keymap rules apply unchanged — see
Zed's key bindings documentation for
contexts, precedence, and the use_key_equivalents option.
Vim and Helix work here
Live preview restyles and conceals text in the real editor rather than replacing the view, so Vim mode, Helix mode, multi-cursor, and search behave normally inside rendered markdown.