Notebook reverse shortcut operations (Split/Merge, Code>Markdown/Markdown>Code)
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
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.
Apologies if this is the wrong place to ask that. I was also wondering about:
- delete cell shortcut (when a cell is not empty)
- hide / unhide all cells
- expand / collapse all cell outputs (for large vertical outputs)
I also want say some features are very well thought, like the option to download the code when the kernel disconnects!
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.
Just like @AdrienDart, I was missing a shortcut to delete cells. I used that a lot in jupyter notebooks, and I did accidentally delete things occasionally. Now I think marimo's approach makes more sense and is safer: delete the cell contents first and then delete it using shift+backspace. It seems more convoluted, but it is safer and doesn't really cost me much, because I am using vim mode. To delete a cell, I delete the content with dap and then shift+backspace.