mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-01-29 02:09:30 +08:00
Add shortcut for evaluating a cell and advancing to the next one (#1294)
This commit is contained in:
parent
9cbecb6871
commit
3cf175c81a
2 changed files with 14 additions and 0 deletions
|
@ -295,6 +295,13 @@ const Session = {
|
|||
cancelEvent(event);
|
||||
this.queueFullCellsEvaluation(true);
|
||||
return;
|
||||
} else if (!cmd && shift && !alt && key === "Enter") {
|
||||
cancelEvent(event);
|
||||
if (isEvaluable(this.focusedCellType())) {
|
||||
this.queueFocusedCellEvaluation();
|
||||
}
|
||||
this.moveFocus(1);
|
||||
return;
|
||||
} else if (cmd && !alt && key === "Enter") {
|
||||
cancelEvent(event);
|
||||
if (isEvaluable(this.focusedCellType())) {
|
||||
|
|
|
@ -112,6 +112,13 @@ defmodule LivebookWeb.SessionLive.ShortcutsComponent do
|
|||
desc: "Evaluate cell in either mode",
|
||||
basic: true
|
||||
},
|
||||
%{
|
||||
seq: ["shift", "↵"],
|
||||
seq_mac: ["⇧", "↵"],
|
||||
press_all: true,
|
||||
desc: "Evaluate cell and advance to next one",
|
||||
basic: true
|
||||
},
|
||||
%{
|
||||
seq: ["ctrl", "shift", "↵"],
|
||||
seq_mac: ["⌘", "⇧", "↵"],
|
||||
|
|
Loading…
Reference in a new issue