commit
75556854b9
11 changed files with 1700 additions and 1044 deletions
|
|
@ -23,7 +23,7 @@
|
|||
<pre id="editor"></pre>
|
||||
|
||||
<!-- load emmet code and snippets compiled for browser -->
|
||||
<script src="https://nightwing.github.io/emmet-core/emmet.js"></script>
|
||||
<script src="https://cloud9ide.github.io/emmet-core/emmet.js"></script>
|
||||
|
||||
<script src="kitchen-sink/require.js"></script>
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -531,7 +531,7 @@ new StatusBar(env.editor, cmdLine.container);
|
|||
|
||||
|
||||
var Emmet = require("ace/ext/emmet");
|
||||
net.loadScript("https://nightwing.github.io/emmet-core/emmet.js", function() {
|
||||
net.loadScript("https://cloud9ide.github.io/emmet-core/emmet.js", function() {
|
||||
Emmet.setCore(window.emmet);
|
||||
env.editor.setOption("enableEmmet", true);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ $(function() {
|
|||
});
|
||||
|
||||
ace.config.loadModule("ace/ext/emmet", function() {
|
||||
ace.require("ace/lib/net").loadScript("http://nightwing.github.io/emmet-core/emmet.js", function() {
|
||||
ace.require("ace/lib/net").loadScript("http://cloud9ide.github.io/emmet-core/emmet.js", function() {
|
||||
embedded_editor.setOption("enableEmmet", true);
|
||||
editor.setOption("enableEmmet", true);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -205,7 +205,6 @@ var Autocomplete = function() {
|
|||
"Ctrl-Down|Ctrl-End": function(editor) { editor.completer.goTo("end"); },
|
||||
|
||||
"Esc": function(editor) { editor.completer.detach(); },
|
||||
"Space": function(editor) { editor.completer.detach(); editor.insert(" ");},
|
||||
"Return": function(editor) { return editor.completer.insertMatch(); },
|
||||
"Shift-Return": function(editor) { editor.completer.insertMatch(true); },
|
||||
"Tab": function(editor) {
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ var TextInput = function(parentNode, host) {
|
|||
resetSelection();
|
||||
});
|
||||
this.focus = function() {
|
||||
if (tempStyle) return text.focus();
|
||||
text.style.position = "fixed";
|
||||
text.style.top = "-1000px";
|
||||
text.focus();
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -36,6 +36,7 @@ define(function(require, exports, module) {
|
|||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var stringEscape = /\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\})/.source;
|
||||
var RustHighlightRules = function() {
|
||||
// regexp must not have capturing parentheses. Use (?:) instead.
|
||||
// regexps are ordered -> the first match is used
|
||||
|
|
@ -44,13 +45,7 @@ var RustHighlightRules = function() {
|
|||
[ { token: 'variable.other.source.rust',
|
||||
regex: '\'[a-zA-Z_][a-zA-Z0-9_]*[^\\\']' },
|
||||
{ token: 'string.quoted.single.source.rust',
|
||||
regex: '\'',
|
||||
push:
|
||||
[ { token: 'string.quoted.single.source.rust',
|
||||
regex: '\'',
|
||||
next: 'pop' },
|
||||
{ include: '#rust_escaped_character' },
|
||||
{ defaultToken: 'string.quoted.single.source.rust' } ] },
|
||||
regex: "'(?:[^'\\\\]|" + stringEscape + ")'" },
|
||||
{
|
||||
stateName: "bracketedComment",
|
||||
onMatch : function(value, currentState, stack){
|
||||
|
|
@ -86,14 +81,15 @@ var RustHighlightRules = function() {
|
|||
[ { token: 'string.quoted.double.source.rust',
|
||||
regex: '"',
|
||||
next: 'pop' },
|
||||
{ include: '#rust_escaped_character' },
|
||||
{ token: 'constant.character.escape.source.rust',
|
||||
regex: stringEscape },
|
||||
{ defaultToken: 'string.quoted.double.source.rust' } ] },
|
||||
{ token: [ 'keyword.source.rust', 'meta.function.source.rust',
|
||||
'entity.name.function.source.rust', 'meta.function.source.rust' ],
|
||||
regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\\'<>]*)(\\s*\\()' },
|
||||
{ token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' },
|
||||
{ token: 'keyword.source.rust',
|
||||
regex: '\\b(?:as|assert|break|claim|const|copy|Copy|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' },
|
||||
regex: '\\b(?:as|assert|break|claim|const|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' },
|
||||
{ token: 'storage.type.source.rust',
|
||||
regex: '\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|isize|usize|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' },
|
||||
{ token: 'variable.language.source.rust', regex: '\\bself\\b' },
|
||||
|
|
@ -137,10 +133,7 @@ var RustHighlightRules = function() {
|
|||
{ token: 'comment.end.block.source.rust',
|
||||
regex: '\\*/',
|
||||
next: 'pop' },
|
||||
{ defaultToken: 'comment.block.source.rust' } ] } ],
|
||||
'#rust_escaped_character':
|
||||
[ { token: 'constant.character.escape.source.rust',
|
||||
regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' } ] }
|
||||
{ defaultToken: 'comment.block.source.rust' } ] } ] }
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
}
|
||||
|
||||
.ace-clouds-midnight .ace_invisible {
|
||||
color: #BFBFBF
|
||||
color: #666
|
||||
}
|
||||
|
||||
.ace-clouds-midnight .ace_keyword,
|
||||
|
|
|
|||
|
|
@ -68,9 +68,12 @@
|
|||
color: black;
|
||||
}
|
||||
|
||||
.ace-github .ace_marker-layer .ace_active-line {
|
||||
.ace-github.ace_focus .ace_marker-layer .ace_active-line {
|
||||
background: rgb(255, 255, 204);
|
||||
}
|
||||
.ace-github .ace_marker-layer .ace_active-line {
|
||||
background: rgb(245, 245, 245);
|
||||
}
|
||||
|
||||
.ace-github .ace_marker-layer .ace_selection {
|
||||
background: rgb(181, 213, 255);
|
||||
|
|
@ -106,7 +109,10 @@
|
|||
.ace-github .ace_marker-layer .ace_selected-word {
|
||||
background: rgb(250, 250, 255);
|
||||
border: 1px solid rgb(200, 200, 250);
|
||||
}
|
||||
|
||||
.ace-github .ace_invisible {
|
||||
color: #BFBFBF
|
||||
}
|
||||
|
||||
.ace-github .ace_print-margin {
|
||||
|
|
|
|||
|
|
@ -55,6 +55,10 @@
|
|||
border: 1px solid rgba(100, 5, 208, 0.27)
|
||||
}
|
||||
|
||||
.ace-katzenmilch .ace_invisible {
|
||||
color: #BFBFBF
|
||||
}
|
||||
|
||||
.ace-katzenmilch .ace_fold {
|
||||
background-color: rgba(2, 95, 73, 0.97);
|
||||
border-color: rgba(15, 0, 9, 1.0)
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@
|
|||
border: 1px solid rgba(245, 170, 0, 0.57);
|
||||
}
|
||||
|
||||
.ace-kuroir .ace_invisible {
|
||||
color: #BFBFBF
|
||||
}
|
||||
|
||||
.ace-kuroir .ace_fold {
|
||||
border-color: #363636;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue