How to disable auto-quotes and auto-brackets in Jupyter 5.0

前端 未结 2 1159
梦毁少年i
梦毁少年i 2021-02-02 09:54

I upgraded Jupyter to the latest vesion, 5.0, and it looks like my front-end configuration stopped working.

I don\'t understand why Jupyter comes with auto closing quote

相关标签:
2条回答
  • 2021-02-02 10:11

    It looks like it can be done by running in a notebook:

    from notebook.services.config import ConfigManager
    c = ConfigManager()
    c.update('notebook', {"CodeCell": {"cm_config": {"autoCloseBrackets": False}}})
    

    This creates a file ~/.jupyter/nbconfig/notebook.json with the content:

    {
      "CodeCell": {
        "cm_config": {
          "autoCloseBrackets": false
        }
      }
    }
    

    After executing the Python command, or manually creating the file, restart your Jupyter notebook, and it should stop auto-closing quotes and brackets.

    0 讨论(0)
  • 2021-02-02 10:12

    For JupyterLab visitors there is a "User Preferences" panel of the "Notebook" settings editor into which you paste & save:

    {
      "codeCellConfig": {
        "autoClosingBrackets": false
      }
    }
    

    Open with Ctrl + , or via menu: SettingsAdvanced Settings Editor & click "Notebook"

    0 讨论(0)
提交回复
热议问题