Skip to content

Commit

Permalink
Merge pull request #289 from kasecato/#281
Browse files Browse the repository at this point in the history
Fixed #281 that keep Notebook keybindings
  • Loading branch information
kasecato authored Apr 2, 2023
2 parents c5f99cb + 4a9ec37 commit badd036
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 0 deletions.
68 changes: 68 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,25 @@
"when": "editorTextFocus",
"intellij": "Select successively increasing code blocks"
},
{
"mac": "alt+up",
"command": "notebook.cell.moveUp",
"when": "notebookEditorFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "ctrl+shift+w",
"mac": "alt+down",
"command": "editor.action.smartSelect.shrink",
"when": "editorTextFocus",
"intellij": "Decrease current selection to previous state"
},
{
"mac": "alt+down",
"command": "notebook.cell.moveDown",
"when": "notebookEditorFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},

{
"key": "alt+enter",
Expand All @@ -212,6 +224,13 @@
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly",
"intellij": "Show intention actions and quick-fixes"
},
{
"key": "alt+enter",
"mac": "alt+enter",
"command": "notebook.cell.executeAndInsertBelow",
"when": "notebookCellListFocused && notebookCellType == 'markup' || notebookCellListFocused && notebookMissingKernelExtension && !notebookCellExecuting && notebookCellType == 'code' || notebookCellListFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelCount > 0 || notebookCellListFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelSourceCount > 0",
"notebook": "To keep Notebook key bindings"
},
{
"key": "ctrl+alt+l",
"mac": "cmd+alt+l",
Expand Down Expand Up @@ -309,13 +328,27 @@
"when": "editorTextFocus && !editorReadonly",
"intellij": "Smart line split"
},
{
"key": "ctrl+enter",
"mac": "cmd+enter",
"command": "notebook.cell.insertCodeCellBelow",
"when": "notebookCellListFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "shift+enter",
"mac": "shift+enter",
"command": "editor.action.insertLineAfter",
"when": "editorTextFocus && !editorReadonly",
"intellij": "Start new line"
},
{
"key": "shift+enter",
"mac": "shift+enter",
"command": "notebook.cell.executeAndSelectBelow",
"when": "notebookCellListFocused && notebookCellType == 'markup' || notebookCellListFocused && notebookMissingKernelExtension && !notebookCellExecuting && notebookCellType == 'code' || notebookCellListFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelCount > 0 || notebookCellListFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelSourceCount > 0",
"notebook": "To keep Notebook key bindings"
},



Expand Down Expand Up @@ -444,6 +477,13 @@
"when": "editorTextFocus && !editorReadonly",
"intellij": "Move Line Down"
},
{
"key": "shift+alt+down",
"mac": "shift+alt+down",
"command": "notebook.cell.copyDown",
"when": "notebookEditorFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "shift+alt+up",
"mac": "shift+alt+up",
Expand Down Expand Up @@ -934,13 +974,27 @@
"when": "textInputFocus",
"intellij": "Move Caret to Text Start"
},
{
"key": "ctrl+home",
"mac": "cmd+up",
"command": "notebook.focusTop",
"when": "notebookEditorFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "ctrl+end",
"mac": "cmd+end",
"command": "cursorBottom",
"when": "textInputFocus",
"intellij": "Move Caret to Text End"
},
{
"key": "ctrl+end",
"mac": "cmd+down",
"command": "notebook.focusBottom",
"when": "notebookEditorFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "ctrl+shift+t",
"mac": "cmd+shift+t",
Expand Down Expand Up @@ -1308,6 +1362,13 @@
"when": "editorTextFocus && !editorReadonly && !suggestWidgetVisible",
"intellij": "Start new line"
},
{
"key": "shift+ctrl+enter",
"mac": "shift+cmd+enter",
"command": "notebook.cell.insertCodeCellAbove",
"when": "notebookCellListFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "alt+f12",
"mac": "alt+f12",
Expand Down Expand Up @@ -1364,6 +1425,13 @@
"intellij": "Open Highlighted File (Explorer)",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsFolder"
},
{
"key": "enter",
"mac": "enter",
"command": "notebook.cell.edit",
"when": "notebookCellListFocused && notebookEditable && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "alt+home",
"mac": "alt+home",
Expand Down
68 changes: 68 additions & 0 deletions src/package-with-comment.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,25 @@
"when": "editorTextFocus",
"intellij": "Select successively increasing code blocks"
},
{
"mac": "alt+up",
"command": "notebook.cell.moveUp",
"when": "notebookEditorFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "ctrl+shift+w",
"mac": "alt+down",
"command": "editor.action.smartSelect.shrink",
"when": "editorTextFocus",
"intellij": "Decrease current selection to previous state"
},
{
"mac": "alt+down",
"command": "notebook.cell.moveDown",
"when": "notebookEditorFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
/*
{
"key": "alt+q",
Expand All @@ -267,6 +279,13 @@
"when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly",
"intellij": "Show intention actions and quick-fixes"
},
{
"key": "alt+enter",
"mac": "alt+enter",
"command": "notebook.cell.executeAndInsertBelow",
"when": "notebookCellListFocused && notebookCellType == 'markup' || notebookCellListFocused && notebookMissingKernelExtension && !notebookCellExecuting && notebookCellType == 'code' || notebookCellListFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelCount > 0 || notebookCellListFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelSourceCount > 0",
"notebook": "To keep Notebook key bindings"
},
{
"key": "ctrl+alt+l",
"mac": "cmd+alt+l",
Expand Down Expand Up @@ -414,13 +433,27 @@
"when": "editorTextFocus && !editorReadonly",
"intellij": "Smart line split"
},
{
"key": "ctrl+enter",
"mac": "cmd+enter",
"command": "notebook.cell.insertCodeCellBelow",
"when": "notebookCellListFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "shift+enter",
"mac": "shift+enter",
"command": "editor.action.insertLineAfter",
"when": "editorTextFocus && !editorReadonly",
"intellij": "Start new line"
},
{
"key": "shift+enter",
"mac": "shift+enter",
"command": "notebook.cell.executeAndSelectBelow",
"when": "notebookCellListFocused && notebookCellType == 'markup' || notebookCellListFocused && notebookMissingKernelExtension && !notebookCellExecuting && notebookCellType == 'code' || notebookCellListFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelCount > 0 || notebookCellListFocused && !notebookCellExecuting && notebookCellType == 'code' && notebookKernelSourceCount > 0",
"notebook": "To keep Notebook key bindings"
},
/*
{
"key": "ctrl+shift+u",
Expand Down Expand Up @@ -576,6 +609,13 @@
"when": "editorTextFocus && !editorReadonly",
"intellij": "Move Line Down"
},
{
"key": "shift+alt+down",
"mac": "shift+alt+down",
"command": "notebook.cell.copyDown",
"when": "notebookEditorFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "shift+alt+up",
"mac": "shift+alt+up",
Expand Down Expand Up @@ -1295,13 +1335,27 @@
"when": "textInputFocus",
"intellij": "Move Caret to Text Start"
},
{
"key": "ctrl+home",
"mac": "cmd+up",
"command": "notebook.focusTop",
"when": "notebookEditorFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "ctrl+end",
"mac": "cmd+end",
"command": "cursorBottom",
"when": "textInputFocus",
"intellij": "Move Caret to Text End"
},
{
"key": "ctrl+end",
"mac": "cmd+down",
"command": "notebook.focusBottom",
"when": "notebookEditorFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "ctrl+shift+t",
"mac": "cmd+shift+t",
Expand Down Expand Up @@ -1772,6 +1826,13 @@
"when": "editorTextFocus && !editorReadonly && !suggestWidgetVisible",
"intellij": "Start new line"
},
{
"key": "shift+ctrl+enter",
"mac": "shift+cmd+enter",
"command": "notebook.cell.insertCodeCellAbove",
"when": "notebookCellListFocused && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "alt+f12",
"mac": "alt+f12",
Expand Down Expand Up @@ -1828,6 +1889,13 @@
"intellij": "Open Highlighted File (Explorer)",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsFolder"
},
{
"key": "enter",
"mac": "enter",
"command": "notebook.cell.edit",
"when": "notebookCellListFocused && notebookEditable && !inputFocus",
"notebook": "To keep Notebook key bindings"
},
{
"key": "alt+home",
"mac": "alt+home",
Expand Down

0 comments on commit badd036

Please sign in to comment.