Merge branch 'master' of github.com:ajaxorg/editor

This commit is contained in:
Eddy Bruel 2010-10-26 16:54:25 +02:00
commit d021463d4f
16 changed files with 1007 additions and 17 deletions

View file

@ -791,6 +791,8 @@ var Editor = function(renderer, doc) {
this.gotoLine = function(lineNumber, row) {
this.selection.clearSelection();
this.$blockScrolling = true;
this.moveCursorTo(lineNumber-1, row || 0);
this.$blockScrolling = false;
@ -962,9 +964,9 @@ var Editor = function(renderer, doc) {
var range = this.$search.find(this.doc);
if (range) {
this.selection.setSelectionRange(range);
this.$updateDesiredColumn();
this.gotoLine(range.end.row+1, range.end.column);
this.$updateDesiredColumn();
this.selection.setSelectionRange(range);
}
};

View file

@ -184,7 +184,6 @@ var VirtualRenderer = function(container, theme) {
this.setTokenizer = function(tokenizer) {
this.$textLayer.setTokenizer(tokenizer);
this.$loop.schedule(this.CHANGE_TEXT);
};
@ -317,7 +316,8 @@ var VirtualRenderer = function(container, theme) {
this.$gutterLayer.update(this.layerConfig);
}
else if (changes & this.CHANGE_LINES) {
this.$updateLines();
this.$updateLines();
this.$updateScrollBar();
}
else if (changes & this.CHANGE_SCROLL) {
this.$textLayer.scrollLines(this.layerConfig);

View file

@ -40,7 +40,7 @@ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
this.getStartRule = function(start) {
return {
token : "doc-comment", // doc comment
token : "comment.doc", // doc comment
regex : "\\/\\*\\*",
next: start
};

View file

@ -46,7 +46,7 @@ JavaScriptHighlightRules = function() {
regex : "\\/\\*",
next : "comment"
}, {
token : "regex",
token : "string.regexp",
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).;]|$)"
}, {
token : "string", // single line

159
src/ace/theme/Clouds.js Normal file
View file

@ -0,0 +1,159 @@
require.def("ace/theme/Clouds",
["ace/lib/dom"], function(dom) {
var cssText = ".ace-clouds .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-clouds .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-clouds .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-clouds .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-clouds .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-clouds .ace_editor .ace_printMargin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-clouds .ace_scroller {\
background-color: #FFFFFF;\
}\
\
.ace-clouds .ace_text-layer {\
cursor: text;\
color: #000000;\
}\
\
.ace-clouds .ace_cursor {\
border-left: 2px solid #000000;\
}\
\
.ace-clouds .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #000000;\
}\
\
.ace-clouds .ace_marker-layer .ace_selection {\
background: #BDD5FC;\
}\
\
.ace-clouds .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-clouds .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #BFBFBF;\
}\
\
.ace-clouds .ace_marker-layer .ace_active_line {\
background: #FFFBD1;\
}\
\
\
.ace-clouds .ace_invisible {\
color: #BFBFBF;\
}\
\
.ace-clouds .ace_keyword {\
color:#AF956F;\
}\
\
.ace-clouds .ace_keyword.ace_operator {\
color:#484848;\
}\
\
.ace-clouds .ace_constant {\
\
}\
\
.ace-clouds .ace_constant.ace_language {\
color:#39946A;\
}\
\
.ace-clouds .ace_constant.ace_library {\
\
}\
\
.ace-clouds .ace_constant.ace_numeric {\
color:#46A609;\
}\
\
.ace-clouds .ace_invalid {\
background-color:#FF002A;\
}\
\
.ace-clouds .ace_invalid.ace_illegal {\
\
}\
\
.ace-clouds .ace_invalid.ace_deprecated {\
\
}\
\
.ace-clouds .ace_support {\
\
}\
\
.ace-clouds .ace_support.ace_function {\
color:#C52727;\
}\
\
.ace-clouds .ace_function.ace_buildin {\
\
}\
\
.ace-clouds .ace_string {\
color:#5D90CD;\
}\
\
.ace-clouds .ace_string.ace_regexp {\
\
}\
\
.ace-clouds .ace_comment {\
color:#BCC8BA;\
}\
\
.ace-clouds .ace_comment.ace_doc {\
\
}\
\
.ace-clouds .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-clouds .ace_variable {\
\
}\
\
.ace-clouds .ace_variable.ace_language {\
\
}\
\
.ace-clouds .ace_xml_pe {\
\
}";
// import CSS once
dom.importCssString(cssText);
return {
cssClass: "ace-clouds"
};
})

View file

@ -0,0 +1,160 @@
require.def("ace/theme/CloudsMidnight",
["ace/lib/dom"], function(dom) {
var cssText = ".ace-clouds-midnight .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-clouds-midnight .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-clouds-midnight .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-clouds-midnight .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-clouds-midnight .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-clouds-midnight .ace_editor .ace_printMargin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-clouds-midnight .ace_scroller {\
background-color: #191919;\
}\
\
.ace-clouds-midnight .ace_text-layer {\
cursor: text;\
color: #929292;\
}\
\
.ace-clouds-midnight .ace_cursor {\
border-left: 2px solid #7DA5DC;\
}\
\
.ace-clouds-midnight .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #7DA5DC;\
}\
\
.ace-clouds-midnight .ace_marker-layer .ace_selection {\
background: #000000;\
}\
\
.ace-clouds-midnight .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-clouds-midnight .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #BFBFBF;\
}\
\
.ace-clouds-midnight .ace_marker-layer .ace_active_line {\
background: rgba(215, 215, 215, 0.031);\
}\
\
\
.ace-clouds-midnight .ace_invisible {\
color: #BFBFBF;\
}\
\
.ace-clouds-midnight .ace_keyword {\
color:#927C5D;\
}\
\
.ace-clouds-midnight .ace_keyword.ace_operator {\
color:#4B4B4B;\
}\
\
.ace-clouds-midnight .ace_constant {\
\
}\
\
.ace-clouds-midnight .ace_constant.ace_language {\
color:#39946A;\
}\
\
.ace-clouds-midnight .ace_constant.ace_library {\
\
}\
\
.ace-clouds-midnight .ace_constant.ace_numeric {\
color:#46A609;\
}\
\
.ace-clouds-midnight .ace_invalid {\
color:#FFFFFF;\
background-color:#E92E2E;\
}\
\
.ace-clouds-midnight .ace_invalid.ace_illegal {\
\
}\
\
.ace-clouds-midnight .ace_invalid.ace_deprecated {\
\
}\
\
.ace-clouds-midnight .ace_support {\
\
}\
\
.ace-clouds-midnight .ace_support.ace_function {\
color:#E92E2E;\
}\
\
.ace-clouds-midnight .ace_function.ace_buildin {\
\
}\
\
.ace-clouds-midnight .ace_string {\
color:#5D90CD;\
}\
\
.ace-clouds-midnight .ace_string.ace_regexp {\
\
}\
\
.ace-clouds-midnight .ace_comment {\
color:#3C403B;\
}\
\
.ace-clouds-midnight .ace_comment.ace_doc {\
\
}\
\
.ace-clouds-midnight .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-clouds-midnight .ace_variable {\
\
}\
\
.ace-clouds-midnight .ace_variable.ace_language {\
\
}\
\
.ace-clouds-midnight .ace_xml_pe {\
\
}";
// import CSS once
dom.importCssString(cssText);
return {
cssClass: "ace-clouds-midnight"
};
})

161
src/ace/theme/Cobalt.js Normal file
View file

@ -0,0 +1,161 @@
require.def("ace/theme/Cobalt",
["ace/lib/dom"], function(dom) {
var cssText = ".ace-cobalt .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-cobalt .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-cobalt .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-cobalt .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-cobalt .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-cobalt .ace_editor .ace_printMargin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-cobalt .ace_scroller {\
background-color: #002240;\
}\
\
.ace-cobalt .ace_text-layer {\
cursor: text;\
color: #FFFFFF;\
}\
\
.ace-cobalt .ace_cursor {\
border-left: 2px solid #FFFFFF;\
}\
\
.ace-cobalt .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #FFFFFF;\
}\
\
.ace-cobalt .ace_marker-layer .ace_selection {\
background: rgba(179, 101, 57, 0.75);\
}\
\
.ace-cobalt .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-cobalt .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(255, 255, 255, 0.15);\
}\
\
.ace-cobalt .ace_marker-layer .ace_active_line {\
background: rgba(0, 0, 0, 0.35);\
}\
\
\
.ace-cobalt .ace_invisible {\
color: rgba(255, 255, 255, 0.15);\
}\
\
.ace-cobalt .ace_keyword {\
color:#FF9D00;\
}\
\
.ace-cobalt .ace_keyword.ace_operator {\
\
}\
\
.ace-cobalt .ace_constant {\
color:#FF628C;\
}\
\
.ace-cobalt .ace_constant.ace_language {\
\
}\
\
.ace-cobalt .ace_constant.ace_library {\
\
}\
\
.ace-cobalt .ace_constant.ace_numeric {\
\
}\
\
.ace-cobalt .ace_invalid {\
color:#F8F8F8;\
background-color:#800F00;\
}\
\
.ace-cobalt .ace_invalid.ace_illegal {\
\
}\
\
.ace-cobalt .ace_invalid.ace_deprecated {\
\
}\
\
.ace-cobalt .ace_support {\
color:#80FFBB;\
}\
\
.ace-cobalt .ace_support.ace_function {\
color:#FFB054;\
}\
\
.ace-cobalt .ace_function.ace_buildin {\
\
}\
\
.ace-cobalt .ace_string {\
\
}\
\
.ace-cobalt .ace_string.ace_regexp {\
color:#80FFC2;\
}\
\
.ace-cobalt .ace_comment {\
font-style:italic;\
color:#0088FF;\
}\
\
.ace-cobalt .ace_comment.ace_doc {\
\
}\
\
.ace-cobalt .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-cobalt .ace_variable {\
color:#CCCCCC;\
}\
\
.ace-cobalt .ace_variable.ace_language {\
color:#FF80E1;\
}\
\
.ace-cobalt .ace_xml_pe {\
\
}";
// import CSS once
dom.importCssString(cssText);
return {
cssClass: "ace-cobalt"
};
})

View file

@ -17,12 +17,12 @@ require.def("ace/theme/Dawn",
}\
\
.ace-dawn .ace_gutter-layer {\
right: 0px;\
width: 100%;\
text-align: right;\
}\
\
.ace-dawn .ace_gutter-layer .ace_gutter-cell {\
padding-right: 15px;\
padding-right: 6px;\
}\
\
.ace-dawn .ace_editor .ace_printMargin {\
@ -127,6 +127,10 @@ color:#B52A1D;\
color:#0B6125;\
}\
\
.ace-dawn .ace_string.ace_regexp {\
color:#CF5628;\
}\
\
.ace-dawn .ace_comment {\
font-style:italic;\
color:#5A525F;\

View file

@ -17,12 +17,12 @@ require.def("ace/theme/IdleFingers",
}\
\
.ace-idle-fingers .ace_gutter-layer {\
right: 0px;\
width: 100%;\
text-align: right;\
}\
\
.ace-idle-fingers .ace_gutter-layer .ace_gutter-cell {\
padding-right: 15px;\
padding-right: 6px;\
}\
\
.ace-idle-fingers .ace_editor .ace_printMargin {\
@ -123,6 +123,10 @@ background-color:#FF0000;\
color:#A5C261;\
}\
\
.ace-idle-fingers .ace_string.ace_regexp {\
color:#CCCC33;\
}\
\
.ace-idle-fingers .ace_comment {\
font-style:italic;\
color:#BC9458;\

161
src/ace/theme/KrTheme.js Normal file
View file

@ -0,0 +1,161 @@
require.def("ace/theme/KrTheme",
["ace/lib/dom"], function(dom) {
var cssText = ".ace-kr-theme .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-kr-theme .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-kr-theme .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-kr-theme .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-kr-theme .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-kr-theme .ace_editor .ace_printMargin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-kr-theme .ace_scroller {\
background-color: #0B0A09;\
}\
\
.ace-kr-theme .ace_text-layer {\
cursor: text;\
color: #FCFFE0;\
}\
\
.ace-kr-theme .ace_cursor {\
border-left: 2px solid #FF9900;\
}\
\
.ace-kr-theme .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #FF9900;\
}\
\
.ace-kr-theme .ace_marker-layer .ace_selection {\
background: rgba(170, 0, 255, 0.45);\
}\
\
.ace-kr-theme .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-kr-theme .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(255, 177, 111, 0.32);\
}\
\
.ace-kr-theme .ace_marker-layer .ace_active_line {\
background: #38403D;\
}\
\
\
.ace-kr-theme .ace_invisible {\
color: rgba(255, 177, 111, 0.32);\
}\
\
.ace-kr-theme .ace_keyword {\
color:#949C8B;\
}\
\
.ace-kr-theme .ace_keyword.ace_operator {\
\
}\
\
.ace-kr-theme .ace_constant {\
color:rgba(210, 117, 24, 0.76);\
}\
\
.ace-kr-theme .ace_constant.ace_language {\
\
}\
\
.ace-kr-theme .ace_constant.ace_library {\
\
}\
\
.ace-kr-theme .ace_constant.ace_numeric {\
\
}\
\
.ace-kr-theme .ace_invalid {\
color:#F8F8F8;\
background-color:#A41300;\
}\
\
.ace-kr-theme .ace_invalid.ace_illegal {\
\
}\
\
.ace-kr-theme .ace_invalid.ace_deprecated {\
\
}\
\
.ace-kr-theme .ace_support {\
color:#9FC28A;\
}\
\
.ace-kr-theme .ace_support.ace_function {\
color:#85873A;\
}\
\
.ace-kr-theme .ace_function.ace_buildin {\
\
}\
\
.ace-kr-theme .ace_string {\
\
}\
\
.ace-kr-theme .ace_string.ace_regexp {\
color:rgba(125, 255, 192, 0.65);\
}\
\
.ace-kr-theme .ace_comment {\
font-style:italic;\
color:#706D5B;\
}\
\
.ace-kr-theme .ace_comment.ace_doc {\
\
}\
\
.ace-kr-theme .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-kr-theme .ace_variable {\
color:#D1A796;\
}\
\
.ace-kr-theme .ace_variable.ace_language {\
color:#FF80E1;\
}\
\
.ace-kr-theme .ace_xml_pe {\
\
}";
// import CSS once
dom.importCssString(cssText);
return {
cssClass: "ace-kr-theme"
};
})

View file

@ -0,0 +1,161 @@
require.def("ace/theme/MonoIndustrial",
["ace/lib/dom"], function(dom) {
var cssText = ".ace-mono-industrial .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-mono-industrial .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-mono-industrial .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-mono-industrial .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-mono-industrial .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-mono-industrial .ace_editor .ace_printMargin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-mono-industrial .ace_scroller {\
background-color: #222C28;\
}\
\
.ace-mono-industrial .ace_text-layer {\
cursor: text;\
color: #FFFFFF;\
}\
\
.ace-mono-industrial .ace_cursor {\
border-left: 2px solid #FFFFFF;\
}\
\
.ace-mono-industrial .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #FFFFFF;\
}\
\
.ace-mono-industrial .ace_marker-layer .ace_selection {\
background: rgba(145, 153, 148, 0.40);\
}\
\
.ace-mono-industrial .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-mono-industrial .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid rgba(102, 108, 104, 0.50);\
}\
\
.ace-mono-industrial .ace_marker-layer .ace_active_line {\
background: rgba(12, 13, 12, 0.25);\
}\
\
\
.ace-mono-industrial .ace_invisible {\
color: rgba(102, 108, 104, 0.50);\
}\
\
.ace-mono-industrial .ace_keyword {\
color:#A39E64;\
}\
\
.ace-mono-industrial .ace_keyword.ace_operator {\
color:#A8B3AB;\
}\
\
.ace-mono-industrial .ace_constant {\
color:#E98800;\
}\
\
.ace-mono-industrial .ace_constant.ace_language {\
\
}\
\
.ace-mono-industrial .ace_constant.ace_library {\
\
}\
\
.ace-mono-industrial .ace_constant.ace_numeric {\
color:#E98800;\
}\
\
.ace-mono-industrial .ace_invalid {\
color:#FFFFFF;\
background-color:rgba(153, 0, 0, 0.68);\
}\
\
.ace-mono-industrial .ace_invalid.ace_illegal {\
\
}\
\
.ace-mono-industrial .ace_invalid.ace_deprecated {\
\
}\
\
.ace-mono-industrial .ace_support {\
\
}\
\
.ace-mono-industrial .ace_support.ace_function {\
color:#588E60;\
}\
\
.ace-mono-industrial .ace_function.ace_buildin {\
\
}\
\
.ace-mono-industrial .ace_string {\
\
}\
\
.ace-mono-industrial .ace_string.ace_regexp {\
\
}\
\
.ace-mono-industrial .ace_comment {\
color:#666C68;\
background-color:#151C19;\
}\
\
.ace-mono-industrial .ace_comment.ace_doc {\
\
}\
\
.ace-mono-industrial .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-mono-industrial .ace_variable {\
\
}\
\
.ace-mono-industrial .ace_variable.ace_language {\
color:#648BD2;\
}\
\
.ace-mono-industrial .ace_xml_pe {\
\
}";
// import CSS once
dom.importCssString(cssText);
return {
cssClass: "ace-mono-industrial"
};
})

161
src/ace/theme/Monokai.js Normal file
View file

@ -0,0 +1,161 @@
require.def("ace/theme/Monokai",
["ace/lib/dom"], function(dom) {
var cssText = ".ace-monokai .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-monokai .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-monokai .ace_gutter {\
width: 50px;\
background: #e8e8e8;\
color: #333;\
overflow : hidden;\
}\
\
.ace-monokai .ace_gutter-layer {\
width: 100%;\
text-align: right;\
}\
\
.ace-monokai .ace_gutter-layer .ace_gutter-cell {\
padding-right: 6px;\
}\
\
.ace-monokai .ace_editor .ace_printMargin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-monokai .ace_scroller {\
background-color: #272822;\
}\
\
.ace-monokai .ace_text-layer {\
cursor: text;\
color: #F8F8F2;\
}\
\
.ace-monokai .ace_cursor {\
border-left: 2px solid #F8F8F0;\
}\
\
.ace-monokai .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #F8F8F0;\
}\
\
.ace-monokai .ace_marker-layer .ace_selection {\
background: #49483E;\
}\
\
.ace-monokai .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-monokai .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #49483E;\
}\
\
.ace-monokai .ace_marker-layer .ace_active_line {\
background: #49483E;\
}\
\
\
.ace-monokai .ace_invisible {\
color: #49483E;\
}\
\
.ace-monokai .ace_keyword {\
color:#F92672;\
}\
\
.ace-monokai .ace_keyword.ace_operator {\
\
}\
\
.ace-monokai .ace_constant {\
\
}\
\
.ace-monokai .ace_constant.ace_language {\
color:#AE81FF;\
}\
\
.ace-monokai .ace_constant.ace_library {\
\
}\
\
.ace-monokai .ace_constant.ace_numeric {\
color:#AE81FF;\
}\
\
.ace-monokai .ace_invalid {\
color:#F8F8F0;\
background-color:#F92672;\
}\
\
.ace-monokai .ace_invalid.ace_illegal {\
\
}\
\
.ace-monokai .ace_invalid.ace_deprecated {\
color:#F8F8F0;\
background-color:#AE81FF;\
}\
\
.ace-monokai .ace_support {\
\
}\
\
.ace-monokai .ace_support.ace_function {\
color:#66D9EF;\
}\
\
.ace-monokai .ace_function.ace_buildin {\
\
}\
\
.ace-monokai .ace_string {\
color:#E6DB74;\
}\
\
.ace-monokai .ace_string.ace_regexp {\
\
}\
\
.ace-monokai .ace_comment {\
color:#75715E;\
}\
\
.ace-monokai .ace_comment.ace_doc {\
\
}\
\
.ace-monokai .ace_comment.ace_doc.ace_tag {\
\
}\
\
.ace-monokai .ace_variable {\
\
}\
\
.ace-monokai .ace_variable.ace_language {\
\
}\
\
.ace-monokai .ace_xml_pe {\
\
}";
// import CSS once
dom.importCssString(cssText);
return {
cssClass: "ace-monokai"
};
})

View file

@ -17,12 +17,12 @@ require.def("ace/theme/Twilight",
}\
\
.ace-twilight .ace_gutter-layer {\
right: 0px;\
width: 100%;\
text-align: right;\
}\
\
.ace-twilight .ace_gutter-layer .ace_gutter-cell {\
padding-right: 15px;\
padding-right: 6px;\
}\
\
.ace-twilight .ace_editor .ace_printMargin {\
@ -125,6 +125,10 @@ color:#D2A8A1;\
color:#8F9D6A;\
}\
\
.ace-twilight .ace_string.ace_regexp {\
color:#E9C062;\
}\
\
.ace-twilight .ace_comment {\
font-style:italic;\
color:#5F5A60;\

View file

@ -19,7 +19,7 @@
}
.ace-tm .ace_gutter-layer .ace_gutter-cell {
padding-right: 15px;
padding-right: 6px;
}
.ace-tm .ace_editor .ace_printMargin {
@ -114,6 +114,6 @@
background: rgb(232, 242, 254);
}
.ace-tm .ace_regex {
.ace-tm .ace_string.ace_regex {
color: rgb(255, 0, 0)
}

View file

@ -14,12 +14,12 @@
}
.%cssClass% .ace_gutter-layer {
right: 0px;
width: 100%;
text-align: right;
}
.%cssClass% .ace_gutter-layer .ace_gutter-cell {
padding-right: 15px;
padding-right: 6px;
}
.%cssClass% .ace_editor .ace_printMargin {
@ -119,6 +119,10 @@
%string%
}
.%cssClass% .ace_string.ace_regexp {
%string.regexp%
}
.%cssClass% .ace_comment {
%comment%
}

View file

@ -74,6 +74,8 @@ var supportedScopes = {
"invalid.deprecated": "invalid.deprecated",
"string": "string",
"string.regexp": "string.regexp",
"comment": "comment",
"comment.documentation": "comment.doc",
"comment.documentation.tag": "comment.doc.tag",
@ -176,10 +178,17 @@ var jsTemplate = fs.readFileSync(__dirname + "/Theme.tmpl.js", "utf8");
var themes = {
"Dawn": "Dawn",
"IdleFingers": "idleFingers",
"Twilight": "Twilight"
"Twilight": "Twilight",
"Monokai": "Monokai",
"Cobalt": "Cobalt",
"MonoIndustrial": "monoindustrial",
"Clouds": "Clouds",
"CloudsMidnight": "Clouds Midnight",
"KrTheme": "krTheme"
}
for (var name in themes) {
console.log("Converting " + name);
var tmTheme = fs.readFileSync(__dirname + "/tmthemes/" + themes[name] + ".tmTheme", "utf8");
var styles = extractStyles(parseTheme(tmTheme));