How to disable autocopy and auto brackets in Jupyter 5.0

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

I don't understand why Jupyter comes with automatically closing quotes and parentheses by default, which I find pretty annoying. Thus, in each version, I have to change the settings to disable it.

It worked by creating a file ~/.jupyter/custom/custom.jsand adding the following JavaScript code:

require(['notebook/js/codecell'], function (codecell) {
  codecell.CodeCell.options_default.cm_config.autoCloseBrackets = false;
})

I read that starting with Jupyter 4 this code can be changed:

IPython.CodeCell.options_default.cm_config.autoCloseBrackets = false;

But it seems that in Jupyter 5 the two previous options have stopped working.

The documentation I found regarding the configuration of the external interface does not help (I will be happy to improve it as soon as I understand it):

http://jupyter-notebook.readthedocs.io/en/latest/frontend_config.html#frontend-config

- , - - Jupyter 5, ?

, :

enter image description here

+13
3

, , :

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

~/.jupyter/nbconfig/notebook.json :

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

Python , Jupyter, .

+16

JupyterLab " " " ", & :

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

Ctrl + , : SettingsAdvanced Settings Editor & ""

+2

It worked for me too. Thank you

0
source

Source: https://habr.com/ru/post/1678029/


All Articles