Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupyter keyboard shortcuts for interrupt, restart, expand selection, and merge #20

Open
seeM opened this issue Apr 25, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@seeM
Copy link

seeM commented Apr 25, 2023

The above-mentioned keyboard shortcuts from Jupyter are missing in VSCode even with the vscode-jupyter-keymap extension.

There's an open PR to add interrupt and restart to vscode-jupyter-keymap but it seems to be stale, so maybe we can add these to the nbdev extension?

Below is the JSON I'm currently using. I think we just need to add it to package.json under key contributes.keybindings.

Let me know what you think. I'm happy to make the PR.

  {
    "key": "i i",
    "command": "jupyter.interruptkernel",
    "when": "notebookEditorFocused && !inputFocus"
  },
  {
    "key": "0 0",
    "command": "jupyter.restartkernel",
    "when": "notebookEditorFocused && !inputFocus"
  },
  {
    "key": "shift+m",
    "command": "notebook.cell.joinBelow",
    "when": "notebookEditorFocused && !inputFocus"
  },
  {
    "key": "shift+m",
    "command": "notebook.cell.joinSelected",
    "when": "notebookEditorFocused && !inputFocus && listMultiSelection"
  },
  {
    "key": "shift+j",
    "command": "list.expandSelectionDown",
    "when": "listFocus && listSupportsMultiselect && !inputFocus"
  },
  {
    "key": "shift+k",
    "command": "list.expandSelectionUp",
    "when": "listFocus && listSupportsMultiselect && !inputFocus"
  },
@seeM seeM added the enhancement New feature or request label Apr 25, 2023
@hamelsmu
Copy link
Member

You don't have to ask me permission to do a PR lol. of course! How do these key bindings work BTW? Is there a "command mode" that you enter into before using these bindings?

@hamelsmu
Copy link
Member

If you make a PR add docs to the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants