Skip to content

Commit

Permalink
add toggle command feature
Browse files Browse the repository at this point in the history
key binding is the same as most IDE/text-editor, `cmd/ctrl + /`.
  • Loading branch information
vcfvct authored Mar 21, 2018
1 parent 5fa1e02 commit ded18cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/components/query-editor/query-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ export class QueryEditorComponent implements AfterViewInit, OnChanges {
extraKeys: {
'Cmd-Enter': (cm) => this.sendRequest.next(cm),
'Ctrl-Enter': (cm) => this.sendRequest.next(cm),
'Ctrl-Space': (cm) => cm.showHint({ completeSingle: true })
'Ctrl-Space': (cm) => cm.showHint({ completeSingle: true }),
'Cmd-/': (cm) => cm.execCommand('toggleComment'),
'Ctrl-/': (cm) => cm.execCommand('toggleComment')
},
gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'],
autoCloseBrackets: true,
Expand Down

0 comments on commit ded18cf

Please sign in to comment.