Merge pull request #47 from jartek/add-keyboard-shortcut-for-explain

Added key binding for explain
This commit is contained in:
Dan Sosedoff 2014-10-30 18:31:17 -05:00
commit a9448a8cdd

View File

@ -253,8 +253,7 @@ function initEditor() {
editor.getSession().setMode("ace/mode/pgsql");
editor.getSession().setTabSize(2);
editor.getSession().setUseSoftTabs(true);
editor.commands.addCommand({
editor.commands.addCommands([{
name: "run_query",
bindKey: {
win: "Ctrl-Enter",
@ -263,7 +262,16 @@ function initEditor() {
exec: function(editor) {
runQuery();
}
});
}, {
name: "explain_query",
bindKey: {
win: "Ctrl-E",
mac: "Command-E"
},
exec: function(editor) {
runExplain();
}
}]);
}
$(document).ready(function() {