Auto-close brackets

156 views
Skip to first unread message

Milos Miljkovic

unread,
Apr 14, 2017, 1:05:46 PM4/14/17
to Project Jupyter
Hiya,

By default CodeMirror sets closing of ()[]{}''"" to auto. I thought that the new way of defining CodeMirror config options is to put them in $HOME/.jupyter/nbconfig/notebook.json, like this:

{

 "Notebook": {

   "Header": false,

   "Toolbar": false

 },

 "Cell": {

   "cm_config": {

     "lineNumbers": true,

     "autoCloseBrackets": false

   }

 }

}


lineNumbers is working but autoCloseBrackets is not. Any ideas why or how to tap into CodeMirror config options? I used to do this before 5.0 NB release in custom.js like:


require([
    'base/js/namespace',
    'base/js/events'],
    $([IPython.events]).on('app_initialized.NotebookApp', function() {

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


}));


but that also is not working.


Cheers,


Milos.

Milos Miljkovic

unread,
Jul 28, 2017, 11:37:21 AM7/28/17
to Project Jupyter
I was being dense. The answer was right in front of me all the time.

{

 "Notebook": {

   "Header": false

 },

 "CodeCell": {

Reply all
Reply to author
Forward
0 new messages