Skip to content

Instantly share code, notes, and snippets.

@Rabeez
Created July 15, 2018 12:20
Show Gist options
  • Select an option

  • Save Rabeez/8ea1d1a330cd83963e07748e15ad763d to your computer and use it in GitHub Desktop.

Select an option

Save Rabeez/8ea1d1a330cd83963e07748e15ad763d to your computer and use it in GitHub Desktop.
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