Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1195)

Unified Diff: Source/devtools/front_end/CodeMirrorTextEditor.js

Issue 15665004: DevTools: [CodeMirror] add comment plugin (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add shortcut Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/devtools.gyp ('k') | Source/devtools/front_end/ScriptsPanelDescriptor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/CodeMirrorTextEditor.js
diff --git a/Source/devtools/front_end/CodeMirrorTextEditor.js b/Source/devtools/front_end/CodeMirrorTextEditor.js
index c2a50b0e2642bf63cfda4e3636fd8bebdf7a0758..9e6ea516035d6dc048be1c80261c8a26f09f1f79 100644
--- a/Source/devtools/front_end/CodeMirrorTextEditor.js
+++ b/Source/devtools/front_end/CodeMirrorTextEditor.js
@@ -37,6 +37,7 @@ importScript("cm/matchbrackets.js");
importScript("cm/closebrackets.js");
importScript("cm/markselection.js");
importScript("cm/showhint.js");
+importScript("cm/comment.js");
/**
* @constructor
@@ -73,7 +74,9 @@ WebInspector.CodeMirrorTextEditor = function(url, delegate)
autoCloseBrackets: true
});
- var extraKeys = {"Ctrl-Space": "autocomplete"};
+ var extraKeys = {};
+ extraKeys["Ctrl-Space"] = "autocomplete";
+ extraKeys[(WebInspector.isMac() ? "Cmd-" : "Ctrl-") + "/"] = "toggleComment";
var indent = WebInspector.settings.textEditorIndent.get();
if (indent === WebInspector.TextUtils.Indent.TabCharacter) {
this._codeMirror.setOption("indentWithTabs", true);
« no previous file with comments | « Source/devtools/devtools.gyp ('k') | Source/devtools/front_end/ScriptsPanelDescriptor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698