Jupyter lab shortcuts

后端 未结 6 1775
-上瘾入骨i
-上瘾入骨i 2020-12-12 21:56

I\'ve been using Jupyter Notebooks for a couple of years now. I\'ve just headed over to Jupyter Lab, but I\'ve found the lack of shortcuts to be a burden.

For exampl

6条回答
  •  天命终不由人
    2020-12-12 22:20

    This question is answered on GitHub here. You can also look here for the correct command names to enter in your keyboard shortcut user overrides because they are not always the same as what is shown in the Commands side-bar.

    The following are some that I use:

    {
      "shortcuts": [
        {
          "command": "notebook:hide-cell-outputs",
          "keys": [
            "O"
          ],
          "selector": ".jp-Notebook:focus"
        },    
        {
          "command": "notebook:show-cell-outputs",
          "keys": [
            "O", 
            "O"
          ],
          "selector": ".jp-Notebook:focus"
        },    
    
        {
          "command": "notebook:hide-all-cell-outputs",
          "keys": [
            "Ctrl L"
          ],
          "selector": ".jp-Notebook:focus"
        },
    
        {
          "command": "notebook:hide-all-cell-code",
          "keys": [
            "Shift O"
          ],
          "selector": ".jp-Notebook:focus"
        }
      ]
    }
    

    which allows you to hide a cell output by pressing O once and showing the cell output by pressing O twice. The last one collapses all cell code with Shift + O as you requested.

提交回复
热议问题