marimo-team / marimo

A reactive notebook for Python — run reproducible experiments, execute as a script, deploy as an app, and version with git.
https://marimo.io
Apache License 2.0
7.87k stars 276 forks source link

Notebook reverse shortcut operations (Split/Merge, Code>Markdown/Markdown>Code) #2644

Open AdrienDart opened 1 month ago

AdrienDart commented 1 month ago

Description

Hi team, as discussed briefly with Myles on Discord, it would be nice to have shortcuts to convert back markdown code to python code. Additionnaly, I'm not sure if it exists but I didn't find a way to merge cells (reverse of split operation) quickly. Thanks for the great job!

Suggested solution

Add the shortcuts and operations

Alternative

No response

Additional context

No response

mscolnick commented 1 month ago

Merge cells makes sense. Could piggy back off #1614

We already have "Code -> Markdown" (cmd+shift+m)

We have a version of "Markdown -> Code" (cmd+shift+m) with slightly different semantics (we keep the code as runnable Python code). So I am hesitant to add another version of this as it may confuse the user on the difference.

AdrienDart commented 1 month ago

Apologies if this is the wrong place to ask that. I was also wondering about:

I also want say some features are very well thought, like the option to download the code when the kernel disconnects!

mscolnick commented 1 month ago

delete cell shortcut (when a cell is not empty)

Currently we do not have this, for when a cell is not empty. I find this could lead to accidental deletions. We could make it a configurable hotkey but not set by default. We also have a hotkey to open the cell actions, so you can use your keyboard to delete from the action menu.

hide / unhide all cells

This should be easy to add. We just don't have it yet. Similar to the fold-all code notebook action

expand / collapse all cell outputs (for large vertical outputs)

Similarly, this should be easy to add.