mirror of
https://github.com/kennethreitz-archive/kJS.tmbundle.git
synced 2026-06-05 23:50:19 +00:00
2b96a7f41b
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@649 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
60 lines
1.9 KiB
Plaintext
60 lines
1.9 KiB
Plaintext
{
|
|
name = "JavaScript";
|
|
scopeName = "source.javascript";
|
|
uuid = "93E017CC-6F27-11D9-90EB-000D93589AF6";
|
|
fileTypes = ( js, htc );
|
|
|
|
foldingStartMarker = "^\\s*([A-Za-z0-9.]+?\\s*=\\s*)?(function)\\>";
|
|
foldingStopMarker = "(^\\s*\\}";
|
|
increaseIndentPattern = "^\\s*(function\\s*\\w*\\s*\\([^)]*\)\s*{.*$";
|
|
smartTypingPairs = (
|
|
( "(", ")" ), ( "[", "]" ), ( "{", "}" ),
|
|
( "\"", "\"" ), ( "'", "'" )
|
|
);
|
|
highlightPairs = (
|
|
( "(", ")" ), ( "[", "]" ), ( "{", "}" )
|
|
);
|
|
|
|
foregroundColor = "#dddddd";
|
|
backgroundColor = "#111111";
|
|
|
|
patterns = (
|
|
{ name = "keyword.js"; foregroundColor = "#CC7833"; match = "\\<(this|typeof|new|true|false|undefined|null|for|in|break|continue|while|do|function|return|if|else|case|switch|var)\\>"; },
|
|
{ name = "constant.numeric.js"; match = "\\<((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\>"; foregroundColor = "#3387CC"; },
|
|
|
|
{
|
|
/*
|
|
Methods:
|
|
obj.method(arguments)
|
|
*/
|
|
name = "keyword.function.js";
|
|
match = "(\\<|\\.)([a-zA-Z_]\\w*(?=\\s*\\())";
|
|
"foregroundColor[2]" = "#CC3833";
|
|
},
|
|
|
|
{
|
|
/*
|
|
Instance Variables:
|
|
RegExp.$3
|
|
ary.lengh
|
|
*/
|
|
name = "keyword.instance-variables.js";
|
|
match = "\\.([a-zA-Z_]\\w*|\\$\\d{1,2})(?!\\s*\\()";
|
|
"foregroundColor[1]" = "#779938";
|
|
},
|
|
|
|
{ name = "string.single-quoted.js"; begin = "'"; end = "'"; swallow = "\\\\."; foregroundColor = "#66CC33"; },
|
|
{ name = "string.double-quoted.js"; begin = "\""; end = "\""; swallow = "\\\\."; foregroundColor = "#66CC33"; },
|
|
|
|
{ name = "string.regex.js"; begin = "/"; end = "/([igm]+)?"; foregroundColor = "#CCCC33";
|
|
patterns = (
|
|
{ name = "string.escaped-slash.js"; match = "\\\\/"; foregroundColor = "#CCCC33"; }
|
|
);
|
|
},
|
|
|
|
{ name = "comment.block.js"; begin = "\\/\\*"; end = "\\*\\/"; swallow = "\\\\."; foregroundColor = "#9933CC"; },
|
|
{ name = "comment.line.js"; match = "\\/\\/.*$"; "fontStyle" = ( italic ); foregroundColor = "#9933CC"; },
|
|
);
|
|
}
|
|
|