Skip to content

feat(command-mode): add shortcut to create a SQL cell below - #10701

Merged
Light2Dark merged 3 commits into
marimo-team:mainfrom
Aniket-a14:feat/command-mode-sql-cell-shortcut
Sep 7, 2026
Merged

Light2Dark merged 3 commits into
marimo-team:mainfrom
Aniket-a14:feat/command-mode-sql-cell-shortcut

Conversation

@Aniket-a14

@Aniket-a14 Aniket-a14 commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Closes #10688.

Adds command.createSqlCellAfter, bound to q in command mode by default. Pressing Esc then q creates and focuses a new SQL cell below the current cell without executing it, adding the marimo import first if it's missing. The existing b shortcut (plain cell) is unchanged.

Test plan

  • pnpm typecheck / pnpm lint pass
  • Existing hotkey tests pass (no key collisions)
  • Manually verified in a running notebook: Esc → q inserts a focused SQL cell below, in the correct order relative to the auto-inserted import marimo as mo, without running any cell; Esc → b still creates a plain cell (regression check)

@vercel

vercel Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
marimo-docs Ready Ready Preview Sep 6, 2026 9:04am UTC

Request Review

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 29, 2026
@github-actions

github-actions Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Aniket-a14
Aniket-a14 marked this pull request as ready for review August 29, 2026 17:13
@Aniket-a14
Aniket-a14 requested a review from akshayka as a code owner August 29, 2026 17:13
@Aniket-a14

Aniket-a14 commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@Aniket-a14

Copy link
Copy Markdown
Contributor Author

recheck

Comment on lines +560 to +564
const importCellId = maybeAddMarimoImport({
autoInstantiate: true,
createNewCell: actions.createNewCell,
fromCellId: cellId,
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you likely want to add a marimo Import before the cell. Right now it's
selected cell -> import cell -> new sql cell.

There is a before keywords for maybeAddMarimoImport

And you should add tests for this feature too

Press Esc then q to create and focus a new SQL cell below the current
cell, without executing it. Mirrors the existing b (create cell below)
shortcut. Adds the marimo import if missing.

Closes marimo-team#10688
@Aniket-a14
Aniket-a14 force-pushed the feat/command-mode-sql-cell-shortcut branch from 233d3ef to 88f468b Compare September 6, 2026 09:02
Copilot AI lite review requested due to automatic review settings September 6, 2026 09:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Aniket-a14

Copy link
Copy Markdown
Contributor Author

@Light2Dark Addressed the import ordering and added tests in 88f468b.

@Light2Dark Light2Dark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@Light2Dark
Light2Dark merged commit 6dca180 into marimo-team:main Sep 7, 2026
27 checks passed
@Aniket-a14
Aniket-a14 deleted the feat/command-mode-sql-cell-shortcut branch September 7, 2026 10:29

This branch was successfully deployed

1 active deployment
Preview — 88f468b0 Deployed Sep 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a command-mode shortcut to create a SQL cell below

3 participants