Azuredatastudio: Support standard Jupyter Notebook shortcuts

Created on 5 Nov 2018  路  5Comments  路  Source: microsoft/azuredatastudio

Issue Type: Feature Request

As an existing notebook user, I am habituated of using shift+enter or ctrl+enter for running a cell. It will be nice to have those shortcuts in the Notebook

Azure Data Studio version: azuredatastudio 1.2.3-insider (8439cde6106ec3bf443fff5e8a8b54c5e98ac170, 2018-11-01T04:31:37.329Z)
OS version: Windows_NT x64 10.0.17763

Area - Notebooks Enhancement Live site Done

Most helpful comment

In June release, we should try to get as many of these as possible implemented

All 5 comments

Agree with this - also think we should add using CTRL + s to save a notebook. I've lost a few update because I thought I was saving but I wasn't

If you go to Open Keyboard Shortcuts (Ctrl+K, Ctrl+S), you can add the following JSON to replace F5 with your choice of shortcut like Ctrl+Enter.

{ "key": "ctrl+enter", "command": "notebook.command.runactivecell", "when": "notebookEditorVisible" }, { "key": "f5", "command": "-notebook.command.runactivecell", "when": "notebookEditorVisible" }

BUT you cannot get the true functionality of Shift+Enter or Alt+Enter at present, where Shift+Enter is "run this block of code and then move to the next block" or Alt+Enter is "run this code and then add a block immediately below." This is a Visual Studio Code limitation which has been an issue since 2015 (https://github.com/Microsoft/vscode/issues/871).

We could theoretically kind of emulate Alt+Enter with the combination of notebook.command.runactivecell and then notebook.command.addcode, though addcode appears to add a code block to the end of the notebook rather than in the next block below the active block.

These are the keyboard shortcuts that I'd love to see, as they are all supported in Jupyter.

Command Mode shortcuts:

  • Move up & down with up and down keys
  • Shift + up & down to select multiple cells
  • Insert cell above: A
  • Insert cell below: B
  • Cut selected cells: X
  • Copy selected cells: C
  • Paste selected cells below: V
  • Paste selected cells above: Shift + V
  • Deleted selected cells: D, D
  • Undo cell deletion: Z
  • Change cell type to code: Y
  • Change cell type to markdown: M

Edit Mode shortcuts:

  • Run and move to next: Shift + Enter
  • Run and insert block immediately below: Alt + Enter

As far as I can tell, none of those are possible at present.

In June release, we should try to get as many of these as possible implemented

Is this scheduled for release soon? other than using notebooks for documentation or guides I find them of little use when comparing to Juypter and this is mainly due to the short cuts, moving cells, adding cells is very painful and requires lots of context switches. Overall it's a great product so i can't wait for these shortcuts to be implemented. Thanks for your work. Also awesom that ADS is included in SSMS!

bumping again. is there an option to undo cell delete in a context menu anywhere? in a lot of pain right now for having lost a critical cell

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carloscfcortez picture carloscfcortez  路  3Comments

kfrajtak picture kfrajtak  路  3Comments

stevenreddie picture stevenreddie  路  3Comments

Ungerfall picture Ungerfall  路  3Comments

CubsRep picture CubsRep  路  3Comments