change windows shortcuts to match os conventions

This commit is contained in:
nightwing 2011-11-19 17:27:07 +04:00
commit d62c0aa08e

View file

@ -59,7 +59,7 @@ exports.commands = [{
exec: function(editor) { editor.removeLines(); } exec: function(editor) { editor.removeLines(); }
}, { }, {
name: "gotoline", name: "gotoline",
bindKey: bindKey("Ctrl-L", "Command-L"), bindKey: bindKey("Ctrl-G", "Command-L"),
exec: function(editor) { exec: function(editor) {
var line = parseInt(prompt("Enter line number:")); var line = parseInt(prompt("Enter line number:"));
if (!isNaN(line)) { if (!isNaN(line)) {
@ -72,11 +72,11 @@ exports.commands = [{
exec: function(editor) { editor.toggleCommentLines(); } exec: function(editor) { editor.toggleCommentLines(); }
}, { }, {
name: "findnext", name: "findnext",
bindKey: bindKey("Ctrl-K", "Command-G"), bindKey: bindKey("Ctrl-R", "Command-G"),
exec: function(editor) { editor.findNext(); } exec: function(editor) { editor.findNext(); }
}, { }, {
name: "findprevious", name: "findprevious",
bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-G"),
exec: function(editor) { editor.findPrevious(); } exec: function(editor) { editor.findPrevious(); }
}, { }, {
name: "find", name: "find",
@ -87,7 +87,7 @@ exports.commands = [{
} }
}, { }, {
name: "replace", name: "replace",
bindKey: bindKey("Ctrl-R", "Command-Option-F"), bindKey: bindKey("Ctrl-H", "Command-Option-F"),
exec: function(editor) { exec: function(editor) {
var needle = prompt("Find:", editor.getCopyText()); var needle = prompt("Find:", editor.getCopyText());
if (!needle) if (!needle)
@ -99,7 +99,7 @@ exports.commands = [{
} }
}, { }, {
name: "replaceall", name: "replaceall",
bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-Option-F"), bindKey: bindKey("Ctrl-Shift-H", "Command-Shift-Option-F"),
exec: function(editor) { exec: function(editor) {
var needle = prompt("Find:"); var needle = prompt("Find:");
if (!needle) if (!needle)
@ -291,11 +291,11 @@ exports.commands = [{
} }
}, { }, {
name: "centerselection", name: "centerselection",
bindKey: bindKey(null, "Ctrl-L"), bindKey: bindKey("Ctrl-L", "Ctrl-L"),
exec: function(editor) { editor.centerSelection(); } exec: function(editor) { editor.centerSelection(); }
}, { }, {
name: "splitline", name: "splitline",
bindKey: bindKey(null, "Ctrl-O"), bindKey: bindKey("Ctrl-K", "Ctrl-O"),
exec: function(editor) { editor.splitLine(); } exec: function(editor) { editor.splitLine(); }
}, { }, {
name: "transposeletters", name: "transposeletters",
@ -323,7 +323,7 @@ exports.commands = [{
} }
}, { }, {
name: "foldall", name: "foldall",
bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"), bindKey: bindKey("Alt-0", "Alt-0"),
exec: function(editor) { exec: function(editor) {
editor.session.foldAll(); editor.session.foldAll();
} }
@ -331,7 +331,7 @@ exports.commands = [{
name: "unfoldall", name: "unfoldall",
bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"), bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"),
exec: function(editor) { exec: function(editor) {
editor.session.unFoldAll(); editor.session.unfold();
} }
}]; }];