Jupyter lab shortcuts

后端 未结 6 1783
-上瘾入骨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:02

    If you cannot save the "User Preferences" settings and get a syntax error

    [additional property error] command is not a valid property

    you have probably missed to nest within the "shortcuts" list, as described here. Additionally, to override an old setting you do the following, using Activate Next Tab and Activate Previous Tab as examples:

    {
        "shortcuts": [
            {
                "command": "application:activate-next-tab",
                "keys": [
                    "Ctrl Shift ]"
                ],
                "selector": "body",
                "disabled": true  // disable old setting
            },
            {
                "command": "application:activate-previous-tab",
                "keys": [
                    "Ctrl Shift ["
                ],
                "selector": "body",
                "disabled": true  // disable old setting
            },
            {
                "command": "application:activate-next-tab",
                "keys": [
                    "Ctrl 1"  // enable new shortcut key
                ],
                "selector": "body"
            },
            {
                "command": "application:activate-previous-tab",
                "keys": [
                    "Ctrl 2"  // enable new shortcut key
                ],
                "selector": "body"
            }
        ]
    }
    

    Now you can click save and refresh your browser for the new setttings to take effect.

提交回复
热议问题