subtlegradient
f577ae87e4
Renamed "Javascript Basic" to "Javascript Embedded" Thanks Infin.
...
New scope: meta.complete.method for the first character of white space after a dot.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8631 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-09 08:18:54 +00:00
subtlegradient
581d5ad997
Changes scopes. source.js => source.js.base, source.js.basic => source.js
...
Include source.js.basic if you want embedded javascript in your language.
Include source.js.base if you want to extend javascript, EG: MooTools
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8614 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-05 21:22:56 +00:00
subtlegradient
97c40c67f1
Merged changes from stable
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8601 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-05 19:41:09 +00:00
subtlegradient
5335a0d676
Copying JavaScript to review
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@8600 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-12-05 18:44:38 +00:00
duff
093215cd0b
• match regexps that follow a ‘return’ keyword, example:
...
return /^[a-zA-Z]([a-zA-Z0-9+-.])*:/.test(s);
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@7067 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-04-26 23:15:46 +00:00
duff
c9ca65bb80
• add jsx as a recognized file type, apparently what Photoshop CS2 and CS3 uses for JavaScript
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@7017 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-04-19 22:02:41 +00:00
duff
29989a44d7
• change several patterns of the form: [A-Za-z…]+\w* into [A-Za-z…][\w…]* — I am thinking though, that ‘…’ should not be allowed for anything but the first character
...
• change a pattern of the fork: \w+ \.? \w* into \w+ (\. \w*)?
Both of the above would previously result in potential really bad performance, because two greedy repeats basically matching the same thing, was after each other, and that leads to exponential time complexity in input size.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6859 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-03-20 11:51:44 +00:00
duff
d01c07ff38
• handle com.some.namespace.Function = test() { } — ticket 2629590E
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6787 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-03-12 14:44:56 +00:00
duff
f405e6a31e
• make /* … */ work again (for uncommenting) — ticket A2F2DDD2
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6761 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-03-09 20:03:31 +00:00
duff
596c674019
Add the following keys to the bundle’s info.plist:
...
contactName:
The full name of the contact for this bundle.
contactEmailRot13:
A ROT13 encoded email address for the bundle contact (we obfuscate it to avoid spammers from picking up the files, seeing how bundles will often be available via anonymous svn over http).
description:
A short description for this bundle. Do link to more info about the language (or whatever) the bundle is about. I decided on using HTML for this (but leave out the initial paragraph tag) since it seemed like overkill to run a single line of text through Markdown.pl, just to convert [foo](link) into <a href="link">foo</a>
Many of the current descriptions could use some improvements, I just wanted to get the ball rolling :)
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6718 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-03-04 20:11:31 +00:00
subtlegradient
0539e44989
Removed old bas scope
...
Set ⌥⇧: as the shortcut for object keys
Set the trigger for "for faster" to "for" to get the menu
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6595 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-02-15 04:34:38 +00:00
duff
9ec26daccc
• recognize documentation comments (/** … */) — patch from Dave Grijalva
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6575 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-02-13 04:48:32 +00:00
subtlegradient
dcb51d605c
Fixed bad copy/paste. It was an em-dash not a -- :/
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6542 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-02-09 15:37:15 +00:00
subtlegradient
8918fc0380
Added the "Improved Native For-Loop" snippet from http://solutoire.com/2007/02/02/efficient-looping-in-javascript/
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6518 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2007-02-03 07:52:40 +00:00
subtlegradient
494487abe6
Fix for javascript "fred = (whatever)" being considered a function
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6341 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-12-12 21:11:31 +00:00
subtlegradient
f7e26af2b9
http://pastie.textmate.org/24618
...
Javascript commenting should use // method like with PHP, not /* ... */
Now it does. Yay comments!
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6258 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-11-28 05:53:13 +00:00
subtlegradient
1d19d9c169
Remove the rule that incorrectly turns anything with a dot before an = into a class. this grammar still needs some serious work imho.
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@6257 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-11-28 03:07:25 +00:00
msheets
82f10d6ae3
Include the delimiters in the string.quoted.single scope rather than just the content.
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5998 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-11-07 22:05:57 +00:00
msheets
bb4b016f32
• Change entity.name.object.js.firebug to entity.name.type.object.js.firebug
...
• Change entity.name.instance to entity.name.type.instance
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5728 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-10-29 20:27:04 +00:00
cskiadas
5fdf24b4fa
First attempt at rearranging.
...
Added getElement snippet.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5720 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-10-29 19:52:42 +00:00
msheets
6fef2d6b80
Add more specific scopes for true|false|null:
...
constant.language.boolean.true.js, constant.language.boolean.false.js, constant.language.null.js
From james on the mailing list.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5650 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-10-26 20:39:09 +00:00
msheets
d60113b0ba
• Added puctuation scopes.
...
• Change meta.delimiter.statement to punctuation.terminator.statement
• Better scope strings in meta.function.json
• Optimize a few of the larger regex matches.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5373 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-10-05 02:56:50 +00:00
haraldmartin
704e02f030
• Added a really handy snippet for all iteration methods. Instead of typing 'each' and then ⇥ (tab) to get the each snippet, you now press ⇧⌃⌘( and you'll get the iterator function. Therefore this works for all iterator functions (inject, reject, each, map etc)
...
• Moved more of the genreric JavaScript snippets (subtleGradient's?) from Prototype → JS bundle
• Added whitespace around '=' and ':' in the Create Class alt snippet (we aren't afraid of whitespace, are we?)
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5310 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-09-26 15:50:54 +00:00
haraldmartin
7c8a8d1c75
• ⇧↩ (shift + enter) will turn the current word as a function (like the ruby one does). ⇧⌃↩ (shift + control + enter) will make it into a method instead (blah: function() { ... })
...
• Cleaned up some snippets like setTimeout and the if/if else/function and others
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5308 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-09-26 15:20:02 +00:00
haraldmartin
9fff45d36d
• Moved a lot of the generic JS stuff from the Prototype bundle to the JS bundle and removed duplicated rules.
...
• Improved some rules to catch more functions (like Object.myfunc = ...)
Some of the rules can be simplified but I'm not a regexp guru so if somebody want to make them shorter/easier/faster, go ahead :)
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5307 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-09-26 14:07:21 +00:00
duff
4a0e3a094f
• forgot octal numbers (in strings) with the first digit higher than 3 (e.g. \57 or \7)
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5203 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-09-13 18:35:54 +00:00
duff
b766a2309c
• markup hex (\xHH) and octal (\377) sequences in strings
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@5202 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-09-13 18:33:01 +00:00
duff
269f63f493
• allow whitespace before colon when declaring functions as ‘foo: function () { … }’
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@4874 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-08-21 12:10:57 +00:00
msheets
d526582b54
Move this & super to a new variable.language rule, though oddly best I can tell super doesn't exist in javascript outside some kind of extension?
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@4734 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-08-14 08:14:15 +00:00
msheets
ffed18bc0c
Remove swallow use in favor of a constant.character.escape pattern.
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@4645 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-08-10 05:04:18 +00:00
duff
fa12f1385a
• use the ellipsis glyph (…) instead of three periods
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@4374 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-07-17 11:24:53 +00:00
subtlegradient
3f366bbbbb
Added a better indent pref. Added some handy snippets. Added some handy scopes to the language
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@4352 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-07-17 07:55:50 +00:00
duff
4cee5c6650
• remove swallow pattern for block comments (I believe this was a cut’n’paste mistake, as escape characters should have no special meaning in JavaScript comments AFAIK)
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@3979 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-07-03 06:22:39 +00:00
duff
6392496e90
• remove mention of tab trigger from the name
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@3648 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-06-14 02:52:10 +00:00
duff
ca22160d0d
• menu structure
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@3504 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-06-02 14:58:27 +00:00
duff
b199a53986
• add matching of functions declared as ‘foobar: function() { … }’ (from Aparajita Fishman)
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@3432 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-05-27 06:17:24 +00:00
duff
4bab9c7fec
• add : as a valid character in front of regexps
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@3217 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-05-03 09:21:09 +00:00
duff
75994f3bf7
• a quick lookup command for JavaScript using the index from http://devguru.com/
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@3006 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-04-12 01:22:15 +00:00
duff
95f6193080
• all single line comments, bullet points (plain text), and quoted lines (mail) now optionally match the newline character — this is so that when the caret is at the end of the line, the scope is still that of “the line.” This is so key equivalents bound to a given scope (like the ‘enter’ key) also work when typing at the end of the line, which would be expected.
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2977 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-04-09 21:31:30 +00:00
duff
5a2572890b
• add prototype snippet from Mike Ter Louw
...
• fix comment character in function snippet
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2721 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2006-02-20 11:02:30 +00:00
cskiadas
3e88431c47
Finished updating dom-1 dictionary.
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2461 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-12-15 04:42:54 +00:00
cskiadas
44039bf8f6
Simplified regexp for support.constant.js to do look-behind for the dot in front. Helps with the highlight if there is a function and a constant with the same name ( eg prompt, link).
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2448 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-12-14 12:56:42 +00:00
cskiadas
077f0e465c
More updating of dom dictionary.
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2447 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-12-14 06:36:11 +00:00
kevin
edda9e4917
Commit patch by h0h from #textmate
...
support.function.event-handler.js names are all lowercased, as required by XHTML
Regexps are now matched more liberally
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2446 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-12-14 00:36:31 +00:00
cskiadas
6bfebbed4c
Updating the list of dom methods, attributes and constants supported. Work in progress
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2438 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-12-13 16:52:15 +00:00
kevin
a120f904cb
Add $ as a possible character to start a function name with
...
I don't know what is actually legal, google tells me word and underscore, but $ is obviously legal as I have code here that has methods starting with it.
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2173 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-11-17 19:16:58 +00:00
duff
aad1c3e5ed
• add rule to markup «something» = function (…) as functions (from Tony Arnold)
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2172 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-11-17 14:34:20 +00:00
duff
3afecd1a35
• do not markup leading spaces as entity.name.function
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2137 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-11-13 14:13:20 +00:00
duff
7644a06f2f
• fix regexp rule to not match the // part of comments
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2033 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-10-28 18:07:42 +00:00
duff
8cc766b829
• updated JavaScript regexp to use look-behind assertion and match escapes inside regexp
...
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/JavaScript.tmbundle@2017 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
2005-10-26 15:23:36 +00:00