Skip to content

Commit

Permalink
Add keyboard shortcut for format query (Ctrl/Cmd+Shift+F) (#3911)
Browse files Browse the repository at this point in the history
* Add keyboard shortcut for format query

* Added to button tooltip
  • Loading branch information
arikfr authored Jun 18, 2019
1 parent 99bf6d1 commit 27c64b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/app/components/QueryEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class QueryEditor extends React.Component {
editor.commands.bindKey({ win: 'Ctrl+P', mac: null }, null);
// Lineup only mac
editor.commands.bindKey({ win: null, mac: 'Ctrl+P' }, 'golineup');
editor.commands.bindKey({ win: 'Ctrl+Shift+F', mac: 'Cmd+Shift+F' }, this.formatQuery);

// Reset Completer in case dot is pressed
editor.commands.on('afterExec', (e) => {
Expand Down Expand Up @@ -266,7 +267,7 @@ class QueryEditor extends React.Component {
{{ }}
</button>
</Tooltip>
<Tooltip placement="top" title="Format Query">
<Tooltip placement="top" title={<>Format Query (<i>{modKey} + Shift + F</i>)</>}>
<button type="button" className="btn btn-default m-r-5" onClick={this.formatQuery}>
<span className="zmdi zmdi-format-indent-increase" />
</button>
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 27c64b4

Please sign in to comment.