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.95k stars 278 forks source link

Usefull keyboard shortcuts #2919

Closed EtienneT closed 21 hours ago

EtienneT commented 22 hours ago

Description

There is several very useful keyboard shortcuts in jupyter lab, for example:

Those don't seem to exist in marimo and would be very useful.

Suggested solution

Add those new shortcuts

Alternative

No response

Additional context

No response

akshayka commented 22 hours ago

These shortcuts exist but they are different.

Image

Deleting a cell in marimo is more destructive than deleting one in Jupyter, since marimo deletes variables in memory. This makes your code reproducible, but it also means that accidentally deleting a cell is not a nice thing. Our deletion shortcuts require the cell code to be empty before kicking in -- backspace or dd if vim keymaps are enabled.

These are also remappable.

Jupyter/JupyterLab have a modal editor, with different manipulation shortcuts depending on whether a cell is focused. For me and others I know, at least, this led to accidentally inputting a bunch of shortcuts when all I wanted to do was type text (I thought a cell was focused but wasn't and accidentally created a cell, accidentally deleted one, accidentally converted to markdown ...), garbling what I saw on screen. I felt this was a very poor user experience, so I am not planning to add modal editing soon.

EtienneT commented 21 hours ago

Thank you for the precisions!