From cf8a7da8ac8cb3841544afc3f64132242ad2495c 2013-07-18 15:56:16 From: Matthias Bussonnier Date: 2013-07-18 15:56:16 Subject: [PATCH] Merge pull request #3673 from minrk/cm-comment enable comment/uncomment selection in notebook Bound to `(cmd|ctrl)-/` --- diff --git a/IPython/html/static/notebook/js/codecell.js b/IPython/html/static/notebook/js/codecell.js index a7bc26a..38a0913 100644 --- a/IPython/html/static/notebook/js/codecell.js +++ b/IPython/html/static/notebook/js/codecell.js @@ -85,7 +85,13 @@ var IPython = (function (IPython) { CodeCell.options_default = { cm_config : { - extraKeys: {"Tab": "indentMore","Shift-Tab" : "indentLess",'Backspace':"delSpaceToPrevTabStop"}, + extraKeys: { + "Tab" : "indentMore", + "Shift-Tab" : "indentLess", + "Backspace" : "delSpaceToPrevTabStop", + "Cmd-/" : "toggleComment", + "Ctrl-/" : "toggleComment" + }, mode: 'ipython', theme: 'ipython', matchBrackets: true diff --git a/IPython/html/templates/notebook.html b/IPython/html/templates/notebook.html index b52bae9..2789c2b 100644 --- a/IPython/html/templates/notebook.html +++ b/IPython/html/templates/notebook.html @@ -211,6 +211,7 @@ class="notebook_app" +