Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: move cell left/right in edit mode (#5808)

Myles Scolnickcb3c1e986d63
diff --git a/frontend/src/core/codemirror/cells/extensions.ts b/frontend/src/core/codemirror/cells/extensions.ts
index 6f68b3c007..2b9d832900 100644
--- a/frontend/src/core/codemirror/cells/extensions.ts
+++ b/frontend/src/core/codemirror/cells/extensions.ts
@@ -138,6 +138,26 @@ function cellKeymaps({
return true;
},
},
+ {
+ key: hotkeys.getHotkey("cell.moveLeft").key,
+ preventDefault: true,
+ stopPropagation: true,
+ run: (ev) => {
+ const actions = ev.state.facet(cellActionsState);
+ actions.moveCell({ cellId, before: true, direction: "left" });
+ return true;
+ },
+ },
+ {
+ key: hotkeys.getHotkey("cell.moveRight").key,
+ preventDefault: true,
+ stopPropagation: true,
+ run: (ev) => {
+ const actions = ev.state.facet(cellActionsState);
+ actions.moveCell({ cellId, before: false, direction: "right" });
+ return true;
+ },
+ },
{
key: "ArrowUp",
preventDefault: true,