Description
Marimo command mode supports Esc, then b to create a new Python cell below the focused cell.
Creating a SQL cell requires an additional conversion step:
Esc
b
Cmd/Ctrl + Shift + L
It would be useful to have a command-mode shortcut such as Esc, then q that directly creates and focuses a new SQL cell below the current cell.
Hex supports this interaction pattern: in command mode, q creates a SQL cell. Its keyboard-shortcut documentation describes command mode and notes that its Add Cell menu exposes shortcuts for creating specific cell types.
Suggested solution
Add a configurable action such as command.createSQLCellAfter, with q as its default command-mode binding.
Expected behavior:
- Press
Esc to enter command mode.
- Press
q.
- Create a new SQL cell immediately below the selected cell.
- Focus the new SQL editor.
- Do not execute the currently selected cell.
- Continue using the existing default SQL engine and output settings.
- Expose the action in the keyboard-shortcut settings so users can remap it.
The existing b shortcut should continue creating a regular Python cell.
Relationship to #6790
This is related to #6790, which proposes that Shift+Enter on a SQL cell should create another SQL cell.
A dedicated command-mode shortcut may be a better approach because it is explicit and does not change the existing semantics of Shift+Enter:
- It separates cell creation from cell execution.
- It works regardless of the current cell’s type.
- Users can deliberately choose between a Python cell with
b and a SQL cell with q.
- It avoids implicitly deriving the new cell type from the preceding cell.
- It does not affect users who expect newly created cells to default to Python.
The two proposals could coexist, but the command-mode shortcut provides the workflow without changing existing behavior.
Are you willing to submit a PR? (You must receive approval from the team before submitting a PR.)
Alternatives
No response
Additional context
No response
Description
Marimo command mode supports
Esc, thenbto create a new Python cell below the focused cell.Creating a SQL cell requires an additional conversion step:
EscbCmd/Ctrl + Shift + LIt would be useful to have a command-mode shortcut such as
Esc, thenqthat directly creates and focuses a new SQL cell below the current cell.Hex supports this interaction pattern: in command mode,
qcreates a SQL cell. Its keyboard-shortcut documentation describes command mode and notes that its Add Cell menu exposes shortcuts for creating specific cell types.Suggested solution
Add a configurable action such as
command.createSQLCellAfter, withqas its default command-mode binding.Expected behavior:
Escto enter command mode.q.The existing
bshortcut should continue creating a regular Python cell.Relationship to #6790
This is related to #6790, which proposes that
Shift+Enteron a SQL cell should create another SQL cell.A dedicated command-mode shortcut may be a better approach because it is explicit and does not change the existing semantics of
Shift+Enter:band a SQL cell withq.The two proposals could coexist, but the command-mode shortcut provides the workflow without changing existing behavior.
Are you willing to submit a PR? (You must receive approval from the team before submitting a PR.)
Alternatives
No response
Additional context
No response