This commit is contained in:
Liang Ding 2014-08-31 22:45:19 +08:00
parent 0062f92da8
commit d2bd3779aa
1 changed files with 8 additions and 1 deletions

View File

@ -141,6 +141,12 @@ var editors = {
return CodeMirror.Pass; return CodeMirror.Pass;
}; };
CodeMirror.commands.gotoLine = function(cm) {
var line = prompt("Go To Line: ", "0");
cm.setCursor(CodeMirror.Pos(line - 1, 0));
};
}, },
newEditor: function(data) { newEditor: function(data) {
$(".ico-fullscreen").show(); $(".ico-fullscreen").show();
@ -178,7 +184,8 @@ var editors = {
"'['": "autocompleteRightPart", "'['": "autocompleteRightPart",
"'{'": "autocompleteRightPart", "'{'": "autocompleteRightPart",
"'\"'": "autocompleteRightPart", "'\"'": "autocompleteRightPart",
"'''": "autocompleteRightPart", "'''": "autocompleteRightPart",
"Ctrl-G": "gotoLine"
} }
}); });
editor.setSize('100%', 430); editor.setSize('100%', 430);