From 0babe02665bb917bd3ebede4f9709dcc52a15b36 Mon Sep 17 00:00:00 2001 From: jartek Date: Thu, 30 Oct 2014 10:42:05 +0530 Subject: [PATCH] Added key binding for explain --- static/js/app.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 13321d5..f909915 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -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() {