Created
February 9, 2016 19:50
-
-
Save jdbrice/e4bf8241371c0909f862 to your computer and use it in GitHub Desktop.
Sublime Keymap for Jupyter Notebooks
This file contains 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) { | |
require("notebook/js/cell").Cell | |
setTimeout(function(){ // uncomment line to fake race-condition | |
require("notebook/js/cell").Cell.options_default.cm_config.keyMap = 'sublime'; | |
var cells = IPython.notebook.get_cells(); | |
for(var c=0; c<cells.length ; c++){ | |
console.log( "Setting Sublime" ) | |
cells[c].code_mirror.setOption('keyMap', 'sublime'); | |
} | |
}, 1000)// uncomment line to fake race condition | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment