Added key binding for explain

This commit is contained in:
jartek 2014-10-30 10:42:05 +05:30
parent 2a780be1c3
commit 0babe02665

View File

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