marimo icon indicating copy to clipboard operation
marimo copied to clipboard

"Shift + Enter" on a SQL cell could create a new SQL cell instead

Open hugoboia opened this issue 1 month ago • 2 comments

Description

Shift+Enter on the last notebook cell runs it and inserts a new cell below. By default the new cell is a Python cell regardless of the previous cell’s type.

Suggested solution

That’s usually fine after a Markdown cell, as I think users rarely add multiple Markdown cells in a row. But for SQL cells, it’s reasonable to expect the next cell to match the previous one.

I know that the shortcut F4 can change the cell type, but I think it's more useful when inserting via "create cell before/after" shortcut, and Shift + Enter is more about "momentum", when running and creating cells in sequence, and this change could improve the flow.

Are you willing to submit a PR?

  • [ ] Yes

Alternatives

No response

Additional context

No response

hugoboia avatar Oct 15 '25 13:10 hugoboia

I think this makes sense and we can add this

Light2Dark avatar Oct 15 '25 17:10 Light2Dark

There's a bit of pushback when we discussed internally since it changes the defaults. I think we will leave this up and see what others think too, and we can revisit with more support. But totally get where this is coming from.

Light2Dark avatar Oct 23 '25 08:10 Light2Dark