|
@@ -27,6 +27,7 @@ const cmdIds = {
|
|
|
restart: 'notebook:restart-kernel',
|
|
|
switchKernel: 'notebook:switch-kernel',
|
|
|
runAndAdvance: 'notebook-cells:run-and-advance',
|
|
|
+ run: 'notebook:run-cell',
|
|
|
deleteCell: 'notebook-cells:delete',
|
|
|
selectAbove: 'notebook-cells:select-above',
|
|
|
selectBelow: 'notebook-cells:select-below',
|
|
@@ -144,6 +145,15 @@ export const SetupCommands = (
|
|
|
);
|
|
|
}
|
|
|
});
|
|
|
+ commands.addCommand(cmdIds.run, {
|
|
|
+ label: 'Run',
|
|
|
+ execute: () => {
|
|
|
+ return NotebookActions.run(
|
|
|
+ nbWidget.content,
|
|
|
+ nbWidget.context.sessionContext
|
|
|
+ );
|
|
|
+ }
|
|
|
+ });
|
|
|
commands.addCommand(cmdIds.editMode, {
|
|
|
label: 'Edit Mode',
|
|
|
execute: () => {
|
|
@@ -212,6 +222,7 @@ export const SetupCommands = (
|
|
|
category = 'Notebook Cell Operations';
|
|
|
[
|
|
|
cmdIds.runAndAdvance,
|
|
|
+ cmdIds.run,
|
|
|
cmdIds.split,
|
|
|
cmdIds.merge,
|
|
|
cmdIds.selectAbove,
|
|
@@ -233,6 +244,11 @@ export const SetupCommands = (
|
|
|
keys: ['Enter'],
|
|
|
command: cmdIds.selectNotebook
|
|
|
},
|
|
|
+ {
|
|
|
+ selector: '.jp-Notebook',
|
|
|
+ keys: ['Ctrl Enter'],
|
|
|
+ command: cmdIds.run
|
|
|
+ },
|
|
|
{
|
|
|
selector: '.jp-Notebook',
|
|
|
keys: ['Shift Enter'],
|