Created
July 15, 2018 12:20
-
-
Save Rabeez/8ea1d1a330cd83963e07748e15ad763d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require(["codemirror/keymap/sublime", "notebook/js/cell", "base/js/namespace"], | |
| function(sublime_keymap, cell, IPython) { | |
| cell.Cell.options_default.cm_config.keyMap = 'sublime'; | |
| cell.Cell.options_default.cm_config.extraKeys["Ctrl-Enter"] = function(cm) {} | |
| var cells = IPython.notebook.get_cells(); | |
| for(var cl=0; cl< cells.length ; cl++){ | |
| cells[cl].code_mirror.setOption('keyMap', 'sublime'); | |
| cells[cl].code_mirror.setOption("extraKeys", { | |
| "Ctrl-Enter": function(cm) {} | |
| }); | |
| } | |
| } | |
| ); | |
| define([ | |
| 'base/js/namespace', | |
| 'base/js/events' | |
| ], | |
| function(IPython, events) { | |
| events.on("app_initialized.NotebookApp", | |
| function () { | |
| IPython.Cell.options_default.cm_config.lineNumbers = true; | |
| } | |
| ); | |
| } | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment