Files
kJS.tmbundle/Syntaxes/JavaScript.plist
T
duff 8e51a1f42f • Added scopeName key to all languages. Most of them as source.<filename>.
• Added a language for plain text files, currently just markups bullet points (so I can continue these on 'enter' using a scoped snippet).
• Added a new “firstLineMatch” key to Perl, Ruby, and Shell languages.
• The C/Objective-C languages use the scopeName in their include directives, this doesn't work for beta 5.
• Ruby now includes “source.ruby” when using #{ ... } in strings.
• Added capture names to a few languages (objective-c methods, though it's not very consistant, we'll need to discuss how to split up functions and name the various parts).
• Removed plist filetype from XML, assuming that people loading a plist into a text editor would generally use the old-style format.



git-svn-id: http://macromates.com/svn/Bundles/trunk/JavaScript.tmbundle@612 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-04-21 07:08:56 +00:00

60 lines
2.0 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 = "keywords.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 = "constants.numeric.js"; match = "\\<((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\>"; foregroundColor = "#3387CC"; },
{
/*
Methods:
obj.method(arguments)
*/
name = "keywords.functions.js";
match = "(\\<|\\.)([a-zA-Z_]\\w*(?=\\s*\\())";
"foregroundColor[2]" = "#CC3833";
},
{
/*
Instance Variables:
RegExp.$3
ary.lengh
*/
name = "keywords.instance-variables.js";
match = "\\.([a-zA-Z_]\\w*|\\$\\d{1,2})(?!\\s*\\()";
"foregroundColor[1]" = "#779938";
},
{ name = "strings.single-quoted.js"; begin = "'"; end = "'"; swallow = "\\\\."; foregroundColor = "#66CC33"; },
{ name = "strings.double-quoted.js"; begin = "\""; end = "\""; swallow = "\\\\."; foregroundColor = "#66CC33"; },
{ name = "strings.regex.js"; begin = "/"; end = "/([igm]+)?"; foregroundColor = "#CCCC33";
patterns = (
{ name = "strings.escaped-slash.js"; match = "\\\\/"; foregroundColor = "#CCCC33"; }
);
},
{ name = "comments.block.js"; begin = "\\/\\*"; end = "\\*\\/"; swallow = "\\\\."; foregroundColor = "#9933CC"; },
{ name = "comments.line.js"; match = "\\/\\/.*$"; "fontStyle" = ( italic ); foregroundColor = "#9933CC"; },
);
}