Commit 7480d157 authored by Klaus Wölfel's avatar Klaus Wölfel

Chromium/NayuOS compatibility for code mirror key bindings

Change autocomplete from Ctrl-Space to Alt-Space, because
the former is already used for switching keyboard language.

Change indent less from Ctrl-] to Shift-Tab, because the
former is already used for switching between browser tabs.

@nexedi any objections ?

/reviewed-on nexedi/erp5!213
parent 838b7375
......@@ -491,6 +491,7 @@
indentWithTabs: false,
matchBrackets: true,
extraKeys: {"Ctrl-Space": "autocomplete",
"Alt-Space": "autocomplete",
"Ctrl-Q": function(cm){cm.foldCode(cm.getCursor());},
"Tab": function(cm) {
// We want to insert spaces, not tab, and we also want to keep the behaviour of indenting selection.
......@@ -500,6 +501,8 @@
var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
cm.replaceSelection(spaces);
},
"Ctrl-I": "indentAuto",
"Shift-Tab": "indentLess",
"Ctrl-S": function(cm){saveDocument(cm, $.Event('click'))}},
foldGutter: true,
lineWrapping: true,
......@@ -703,3 +706,4 @@
generateHistorySelectElement();
</dtml-unless>
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment