Commit Graph

  • e3900be05a NEW Advanced Folding and Indent patterns! Added switch…case tests Thomas Aylott 2008-08-04 14:34:18 -04:00
  • 3c47885cfa More advanced indent & folding tests Thomas Aylott 2008-08-04 12:16:54 -04:00
  • b8efd98c2a Special indent/folding tests Thomas Aylott 2008-08-04 11:02:00 -04:00
  • 80a418e66b updated info.plist for new stuff Thomas Aylott 2008-08-04 10:48:10 -04:00
  • 3b07658fe5 onload listener snippet Thomas Aylott 2008-08-04 10:47:45 -04:00
  • 7013ea5911 new window. snippet like the current document. snippet Thomas Aylott 2008-08-04 10:47:07 -04:00
  • bff49bbc00 Updated proto snippet to match the new style of snippets for this bundle Thomas Aylott 2008-08-04 10:46:40 -04:00
  • 32eedf8f10 New Help command Beginning Help document / GitHub readme Thomas Aylott 2008-08-04 10:44:42 -04:00
  • f7b1a5c139 NEW: Advanced folding rules Added more Tests for folding and indent Thomas Aylott 2008-08-04 10:41:36 -04:00
  • ec65f333b5 Folding & Indent Test Thomas Aylott 2008-08-03 12:37:11 -04:00
  • e696cf88a3 Tests for labels and new new Thomas Aylott 2008-07-28 10:49:24 -04:00
  • cd58b83794 Removed some poorly thought out snippets. Unified the for snippets some more New for snippet for fast DOM iteration Thomas Aylott 2008-07-25 18:27:42 -04:00
  • 1fcef564b0 Added operators to the syntax tests and more examples Thomas Aylott 2008-07-19 18:13:17 -04:00
  • f62ab505b7 Unifying snippet formats Thomas Aylott 2008-07-19 18:11:57 -04:00
  • a6b41e8392 Trying to come up with an exhaustive list of all literal syntax Thomas Aylott 2008-07-08 18:41:48 -04:00
  • cf8398b67d Syntax Tests for Function Calls and Variables / Properties Thomas Aylott 2008-07-08 17:11:56 -04:00
  • 4edcfcb0c7 Removed the conditional-compilation since I moved it into the other syntax Thomas Aylott 2008-07-08 16:59:55 -04:00
  • 879f4c5c9d Changed the forin snippet to match what it actually does Thomas Aylott 2008-07-08 16:57:47 -04:00
  • 60bf481bf5 Added special-comments-conditional-compilation for IE; Added leading-space scopes Thomas Aylott 2008-07-08 16:55:46 -04:00
  • 8f08e77bdd Snippet: try … catch Thomas Aylott 2008-07-08 16:54:39 -04:00
  • 8b7b886f82 Fixed the illegal number scopes subtlegradient 2008-07-07 17:17:39 +00:00
  • d99f721b82 .999 numbers.invalid scopes for octal and hex. -999 and +999 numbers subtlegradient 2008-07-07 17:17:32 +00:00
  • 1a60d48c2a Reorganize the JavaScript Basic syntax. Moved everything into the repository. subtlegradient 2008-07-07 17:17:26 +00:00
  • 3441b11cc2 Fixed the illegal number scopes Thomas Aylott 2008-07-07 13:16:07 -04:00
  • 7d3632c085 .999 numbers.invalid scopes for octal and hex. -999 and +999 numbers Thomas Aylott 2008-07-07 13:07:57 -04:00
  • dad2829a89 Reorganize the JavaScript Basic syntax. Moved everything into the repository. Thomas Aylott 2008-07-07 12:09:58 -04:00
  • 3e3082b4d4 New document. snippet, because you end up typing that a billion times subtlegradient 2008-07-05 23:42:42 +00:00
  • 9befbaa4c5 Attempting to unify the style of the various snippets. The idea is that if it's fewer characters to add something than to remove it, then it gets removed from the snippet. subtlegradient 2008-07-05 23:42:37 +00:00
  • ec99bb4c5c Removed the anonymous function from the timeout snippet. You can easily add your own with the f snippet subtlegradient 2008-07-05 23:42:29 +00:00
  • 7a68cfb531 Degault the Get Elements snippet to getElementById instead of getElementsByTagName subtlegradient 2008-07-05 23:42:24 +00:00
  • c18a767790 Improved String Literal syntax. Fixed the "bug" where an unclosed string extends past the closign script tag in html. String should end on \n with a syntax error String should end on </script>\n with a syntax error String should mark </script> as invalid subtlegradient 2008-07-05 23:42:19 +00:00
  • a8b22dbdda More and more syntax tests subtlegradient 2008-07-05 23:42:13 +00:00
  • 52fedbc920 New document. snippet, because you end up typing that a billion times subtlegradient 2008-07-05 23:42:42 +00:00
  • de7b84b470 Attempting to unify the style of the various snippets. The idea is that if it's fewer characters to add something than to remove it, then it gets removed from the snippet. subtlegradient 2008-07-05 23:42:37 +00:00
  • 78f785b43d Removed the anonymous function from the timeout snippet. You can easily add your own with the f snippet subtlegradient 2008-07-05 23:42:29 +00:00
  • bba6f216d7 Degault the Get Elements snippet to getElementById instead of getElementsByTagName subtlegradient 2008-07-05 23:42:24 +00:00
  • ac0c3b2f56 Improved String Literal syntax. Fixed the "bug" where an unclosed string extends past the closign script tag in html. String should end on \n with a syntax error String should end on </script>\n with a syntax error String should mark </script> as invalid subtlegradient 2008-07-05 23:42:19 +00:00
  • 37132a7244 More and more syntax tests subtlegradient 2008-07-05 23:42:13 +00:00
  • be9de4befd Internet Explorer Conditional Comment snippets subtlegradient 2008-07-02 17:01:58 +00:00
  • 5692efe8c1 Removed redundant group scope subtlegradient 2008-07-02 17:01:52 +00:00
  • 535a98f1f7 More syntax tests subtlegradient 2008-07-02 17:01:46 +00:00
  • 743c785083 Scientific notation => Ex, 1e5 and 2.5E5 from Joseph Pecoraro subtlegradient 2008-07-02 17:01:42 +00:00
  • 87f90e9d19 Don't require a space after the function keyword Merging in a modified version of Joseph Pecoraro's fix here: http://pastie.textmate.org/private/hxkpy8qkahofrxwyvp4coq subtlegradient 2008-07-02 17:01:36 +00:00
  • 60c8151e9b Merging in the regex fixes from Joseph Pecoraro as seen here: http://lists.macromates.com/textmate/2008-June/025973.html subtlegradient 2008-07-02 17:01:31 +00:00
  • 65981d95f2 Some syntax tests subtlegradient 2008-07-02 17:01:25 +00:00
  • a09b74f571 Impriving regexp literals subtlegradient 2008-07-02 17:01:20 +00:00
  • b5363c34e5 Undefined -> undefined subtlegradient 2008-07-02 17:01:15 +00:00
  • efa328fc93 Improved meta.function.json.js with punctuation and proper storage.type subtlegradient 2008-07-02 17:01:10 +00:00
  • a8f3f40b77 Added a tests folder with some starter files subtlegradient 2008-07-02 17:01:05 +00:00
  • 7ca0d476cf Unifying the "for" snippets diff --git "a/Snippets/for (in) {\342\200\246}.tmSnippet" "b/Snippets/for (in) {\342\200\246}.tmSnippet" index d7e0848..b64dede 100644 --- "a/Snippets/for (in) {\342\200\246}.tmSnippet" +++ "b/Snippets/for (in) {\342\200\246}.tmSnippet" @@ -3,8 +3,8 @@ <plist version="1.0"> <dict> <key>content</key> - <string>for (var ${1:x} in ${2:Things}) { - ${0:${1:x}} + <string>for (var ${1:thing} in ${2:Things}) { + $0${1:thing} };</string> <key>name</key> <string>for (in) {…}</string> diff --git "a/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet" "b/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet" index b34c0f5..9408455 100644 --- "a/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet" +++ "b/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet" @@ -4,7 +4,7 @@ <dict> <key>content</key> <string>for (var ${20:i}=0,${2:thing}; ${2:thing}=${1:Things}[${20:i}]; ${20:i}++){ - ${2:thing}$0 + $0${2:thing} }; </string> <key>name</key> diff --git "a/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet" "b/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet" index 34e6b71..2853eb2 100644 --- "a/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet" +++ "b/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet" @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>content</key> <string>for (var ${20:i} = ${1:Things}.length - 1; ${20:i} &gt;= 0; ${20:i}--){ - ${100:${1:Things}[${20:i}]}$0 + $0${100:${1:Things}[${20:i}]} };</string> <key>name</key> <string>for (…) {…} (Improved Native For-Loop)</string> diff --git "a/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet" "b/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet" index 6208a16..852d3f5 100644 --- "a/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet" +++ "b/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet" @@ -4,7 +4,7 @@ <dict> <key>content</key> <string>for (var ${20:i}=0; ${20:i} &lt; ${1:Things}.length; ${20:i}++) { - ${100:${1:Things}[${20:i}]}$0 + $0${100:${1:Things}[${20:i}]} };</string> <key>name</key> <string>for (…) {…}</string> subtlegradient 2008-07-02 17:00:59 +00:00
  • 1899a8afde Internet Explorer Conditional Comment snippets Thomas Aylott 2008-07-02 13:00:07 -04:00
  • 3c2791d816 Removed redundant group scope Thomas Aylott 2008-07-02 12:57:58 -04:00
  • 205fd81c21 More syntax tests Thomas Aylott 2008-07-02 12:57:25 -04:00
  • 73900868d5 Scientific notation => Ex, 1e5 and 2.5E5 from Joseph Pecoraro Joseph Pecoraro 2008-07-02 12:52:49 -04:00
  • 6fa933fc13 Don't require a space after the function keyword Merging in a modified version of Joseph Pecoraro's fix here: http://pastie.textmate.org/private/hxkpy8qkahofrxwyvp4coq Thomas Aylott 2008-07-02 12:42:58 -04:00
  • 0bdaea84f6 Merging in the regex fixes from Joseph Pecoraro as seen here: http://lists.macromates.com/textmate/2008-June/025973.html Joseph Pecoraro 2008-07-02 12:36:52 -04:00
  • b33bf433e4 Some syntax tests Thomas Aylott 2008-07-02 12:19:40 -04:00
  • ee10b85ff5 Impriving regexp literals Thomas Aylott 2008-07-02 12:17:34 -04:00
  • f355cab4ce Undefined -> undefined Thomas Aylott 2008-07-02 11:47:48 -04:00
  • 2be7a89002 Improved meta.function.json.js with punctuation and proper storage.type Thomas Aylott 2008-07-02 11:44:06 -04:00
  • 16eb9fd504 Added a tests folder with some starter files Thomas Aylott 2008-07-02 11:04:44 -04:00
  • 7e0e08cd6a Unifying the "for" snippets diff --git "a/Snippets/for (in) {\342\200\246}.tmSnippet" "b/Snippets/for (in) {\342\200\246}.tmSnippet" index d7e0848..b64dede 100644 --- "a/Snippets/for (in) {\342\200\246}.tmSnippet" +++ "b/Snippets/for (in) {\342\200\246}.tmSnippet" @@ -3,8 +3,8 @@ <plist version="1.0"> <dict> <key>content</key> - <string>for (var ${1:x} in ${2:Things}) { - ${0:${1:x}} + <string>for (var ${1:thing} in ${2:Things}) { + $0${1:thing} };</string> <key>name</key> <string>for (in) {…}</string> diff --git "a/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet" "b/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet" index b34c0f5..9408455 100644 --- "a/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet" +++ "b/Snippets/for (\342\200\246) {\342\200\246} (PPK).tmSnippet" @@ -4,7 +4,7 @@ <dict> <key>content</key> <string>for (var ${20:i}=0,${2:thing}; ${2:thing}=${1:Things}[${20:i}]; ${20:i}++){ - ${2:thing}$0 + $0${2:thing} }; </string> <key>name</key> diff --git "a/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet" "b/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet" index 34e6b71..2853eb2 100644 --- "a/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet" +++ "b/Snippets/for (\342\200\246) {\342\200\246} (faster).tmSnippet" @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>content</key> <string>for (var ${20:i} = ${1:Things}.length - 1; ${20:i} &gt;= 0; ${20:i}--){ - ${100:${1:Things}[${20:i}]}$0 + $0${100:${1:Things}[${20:i}]} };</string> <key>name</key> <string>for (…) {…} (Improved Native For-Loop)</string> diff --git "a/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet" "b/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet" index 6208a16..852d3f5 100644 --- "a/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet" +++ "b/Snippets/for (\342\200\246) {\342\200\246}.tmSnippet" @@ -4,7 +4,7 @@ <dict> <key>content</key> <string>for (var ${20:i}=0; ${20:i} &lt; ${1:Things}.length; ${20:i}++) { - ${100:${1:Things}[${20:i}]}$0 + $0${100:${1:Things}[${20:i}]} };</string> <key>name</key> <string>for (…) {…}</string> Thomas Aylott 2008-07-02 11:04:01 -04:00
  • b84367b126 Fixed regression with nested groups and functions subtlegradient 2008-03-16 06:35:43 +00:00
  • bb8deef61d Tweaking regex for optimization and performance. disabling "punctuation.section.scope.round" seems to have helped. subtlegradient 2008-03-16 06:16:45 +00:00
  • 7a80c6d2ab Fixed snippet. I'd accidentally sent a half-finished version :'( subtlegradient 2008-03-16 06:14:13 +00:00
  • 151f7a83eb Don't match a single slash (/) as a regex literal unless there's another one on the same line. Force Regex literals to end at the end of the line. This helps solve some performance issues while coding. Thanks Daniel Stockman subtlegradient 2008-03-16 03:24:13 +00:00
  • d72e54c64d Fixed the parsing of object values that are regular expression literal. Thanks Daniel Stockman subtlegradient 2008-03-16 02:38:15 +00:00
  • bc39c3bdca Cleaned up "for in" snippets and added a new ultra-fast one from quirksmode. subtlegradient 2008-03-14 18:31:48 +00:00
  • b6f84d2641 New "for (in){…}" snippet subtlegradient 2007-12-09 08:20:27 +00:00
  • 1f347c3df7 Cleaned up snippets subtlegradient 2007-12-09 08:19:31 +00:00
  • f6ff90bedc Split out object-properties into the repository to keep things clean subtlegradient 2007-12-09 08:19:12 +00:00
  • f577ae87e4 Renamed "Javascript Basic" to "Javascript Embedded" Thanks Infin. New scope: meta.complete.method for the first character of white space after a dot. subtlegradient 2007-12-09 08:18:54 +00:00
  • 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 subtlegradient 2007-12-05 21:22:56 +00:00
  • 97c40c67f1 Merged changes from stable subtlegradient 2007-12-05 19:41:09 +00:00
  • 5335a0d676 Copying JavaScript to review subtlegradient 2007-12-05 18:44:38 +00:00
  • 093215cd0b • match regexps that follow a ‘return’ keyword, example: duff 2007-04-26 23:15:46 +00:00
  • c9ca65bb80 • add jsx as a recognized file type, apparently what Photoshop CS2 and CS3 uses for JavaScript duff 2007-04-19 22:02:41 +00:00
  • 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*)? duff 2007-03-20 11:51:44 +00:00
  • d01c07ff38 • handle com.some.namespace.Function = test() { } — ticket 2629590E duff 2007-03-12 14:44:56 +00:00
  • f405e6a31e • make /* … */ work again (for uncommenting) — ticket A2F2DDD2 duff 2007-03-09 20:03:31 +00:00
  • 596c674019 Add the following keys to the bundle’s info.plist: duff 2007-03-04 20:11:31 +00:00
  • 0539e44989 Removed old bas scope Set ⌥⇧: as the shortcut for object keys Set the trigger for "for faster" to "for" to get the menu subtlegradient 2007-02-15 04:34:38 +00:00
  • 9ec26daccc • recognize documentation comments (/** … */) — patch from Dave Grijalva duff 2007-02-13 04:48:32 +00:00
  • dcb51d605c Fixed bad copy/paste. It was an em-dash not a -- :/ subtlegradient 2007-02-09 15:37:15 +00:00
  • 8918fc0380 Added the "Improved Native For-Loop" snippet from http://solutoire.com/2007/02/02/efficient-looping-in-javascript/ subtlegradient 2007-02-03 07:52:40 +00:00
  • 494487abe6 Fix for javascript "fred = (whatever)" being considered a function subtlegradient 2006-12-12 21:11:31 +00:00
  • f7e26af2b9 http://pastie.textmate.org/24618 Javascript commenting should use // method like with PHP, not /* ... */ Now it does. Yay comments! subtlegradient 2006-11-28 05:53:13 +00:00
  • 1d19d9c169 Remove the rule that incorrectly turns anything with a dot before an = into a class. this grammar still needs some serious work imho. subtlegradient 2006-11-28 03:07:25 +00:00
  • 82f10d6ae3 Include the delimiters in the string.quoted.single scope rather than just the content. msheets 2006-11-07 22:05:57 +00:00
  • bb4b016f32 • Change entity.name.object.js.firebug to entity.name.type.object.js.firebug • Change entity.name.instance to entity.name.type.instance msheets 2006-10-29 20:27:04 +00:00
  • 5fdf24b4fa First attempt at rearranging. Added getElement snippet. cskiadas 2006-10-29 19:52:42 +00:00
  • 6fef2d6b80 Add more specific scopes for true|false|null: msheets 2006-10-26 20:39:09 +00:00
  • 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. msheets 2006-10-05 02:56:50 +00:00
  • 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) haraldmartin 2006-09-26 15:50:54 +00:00
  • 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 haraldmartin 2006-09-26 15:20:02 +00:00
  • 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 = ...) haraldmartin 2006-09-26 14:07:21 +00:00
  • 4a0e3a094f • forgot octal numbers (in strings) with the first digit higher than 3 (e.g. \57 or \7) duff 2006-09-13 18:35:54 +00:00
  • b766a2309c • markup hex (\xHH) and octal (\377) sequences in strings duff 2006-09-13 18:33:01 +00:00
  • 269f63f493 • allow whitespace before colon when declaring functions as ‘foo: function () { … }’ duff 2006-08-21 12:10:57 +00:00
  • 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? msheets 2006-08-14 08:14:15 +00:00