Merge pull request #2745 from gnestor/keymap-default

Make "extraKeys" consistent for notebook and editor
Thomas Kluyver 9 years ago committed by GitHub
commit 11ba6be432

@ -76,12 +76,18 @@ function(
// default CodeMirror options
Editor.default_codemirror_options = {
extraKeys: {
"Tab" : "indentMore",
"Cmd-Right": "goLineRight",
"End": "goLineRight",
"Cmd-Left": "goLineLeft",
"Tab": "indentMore",
"Shift-Tab" : "indentLess",
"Cmd-/" : "toggleComment",
"Ctrl-/" : "toggleComment",
},
indentUnit: 4,
theme: "ipython",
lineNumbers: true,
lineWrapping: true,
lineWrapping: true
};
Editor.prototype.load = function() {
@ -170,7 +176,7 @@ function(
Editor: {
file_extension_modes: update_mode_map,
}
})
});
};
Editor.prototype.get_filename = function () {

@ -125,7 +125,7 @@ define([
});
this.events.on("config_changed.Editor", function () {
var keyMap = editor.codemirror.getOption('keyMap') || "default";
var keyMap = editor.codemirror.getOption('keyMap') || 'default';
that.element.find(".selected-keymap").removeClass("selected-keymap");
that.element.find("#menu-keymap-" + keyMap).addClass("selected-keymap");
});

@ -134,8 +134,6 @@ define([
"Cmd-Left": "goLineLeft",
"Tab": "indentMore",
"Shift-Tab" : "indentLess",
// "Cmd-Alt-[" : "indentAuto",
// "Ctrl-Alt-[" : "indentAuto",
"Cmd-/" : "toggleComment",
"Ctrl-/" : "toggleComment",
}

Loading…
Cancel
Save