Merge pull request #9854 from gangachris/feature/enable-editor-comments

Add ability to toggle comments with control+/ or command+/ keymap
This commit is contained in:
Mrugesh Mohapatra
2016-07-22 23:40:21 +05:30
committed by GitHub
2 changed files with 7 additions and 0 deletions

View File

@ -68,6 +68,12 @@ window.common = (function(global) {
'Cmd-Enter': function() {
common.editorExecute$.onNext();
return false;
},
'Ctrl-/': function(cm) {
cm.toggleComment();
},
'Cmd-/': function(cm) {
cm.toggleComment();
}
});

View File

@ -81,6 +81,7 @@ var paths = {
'public/bower_components/jshint/dist/jshint.js',
'public/bower_components/chai/chai.js',
'public/bower_components/CodeMirror/lib/codemirror.js',
'public/bower_components/CodeMirror/addon/comment/comment.js',
'public/bower_components/CodeMirror/addon/edit/closebrackets.js',
'public/bower_components/CodeMirror/addon/edit/matchbrackets.js',
'public/bower_components/CodeMirror/addon/lint/lint.js',