diff --git a/support/Comments.tmPreferences b/support/Comments.tmPreferences new file mode 100644 index 0000000..f16fa66 --- /dev/null +++ b/support/Comments.tmPreferences @@ -0,0 +1,33 @@ + + + + name + Comments + scope + source.js, source.json + settings + + shellVariables + + + name + TM_COMMENT_START + value + // + + + name + TM_COMMENT_START_2 + value + /* + + + name + TM_COMMENT_END_2 + value + */ + + + + + diff --git a/support/Completion Rules.tmPreferences b/support/Completion Rules.tmPreferences new file mode 100644 index 0000000..c5c3352 --- /dev/null +++ b/support/Completion Rules.tmPreferences @@ -0,0 +1,12 @@ + + + + scope + source.js + settings + + cancelCompletion + ^\s*(\{?\s*(else|return|do)|(function)\s*[a-zA-Z_0-9]+)$ + + + diff --git a/support/Indexed Symbols.tmPreferences b/support/Indexed Symbols.tmPreferences new file mode 100644 index 0000000..9cec1c6 --- /dev/null +++ b/support/Indexed Symbols.tmPreferences @@ -0,0 +1,12 @@ + + + + scope + source.js meta.function.declaration.js entity.name.function.js, source.js meta.class.js entity.name.class.js + settings + + showInIndexedSymbolList + 1 + + + diff --git a/support/JavaScript Indent.tmPreferences b/support/JavaScript Indent.tmPreferences new file mode 100644 index 0000000..b5122ed --- /dev/null +++ b/support/JavaScript Indent.tmPreferences @@ -0,0 +1,22 @@ + + + + name + JavaScript Indent + scope + source.js + settings + + decreaseIndentPattern + ^(.*\*/)?\s*\}.*$ + increaseIndentPattern + ^.*\{[^}"']*$ + + bracketIndentNextLinePattern + (?x) + ^ \s* \b(if|while|else)\b [^;]* $ + | ^ \s* \b(for)\b .* $ + + + + diff --git a/support/Regular Expressions (JavaScript).sublime-syntax b/support/Regular Expressions (JavaScript).sublime-syntax new file mode 100644 index 0000000..b6d5ccb --- /dev/null +++ b/support/Regular Expressions (JavaScript).sublime-syntax @@ -0,0 +1,131 @@ +%YAML 1.2 +--- +name: Regular Expressions (Javascript) +scope: source.regexp.js +hidden: true +variables: + identifier: '[_$[:alpha:]][_$[:alnum:]]*' +contexts: + main: + - include: anchor + - include: backref + - include: quantifier + - include: operator + - include: group-assertion + - include: group-definition + - include: character-class + - include: character-class-definition + + anchor: + - match: '\\[bB]|\^|\$' + scope: keyword.control.anchor.regexp + + backref: + - match: '\\[1-9][0-9]*' + scope: keyword.other.back-reference.regexp + + - match: (\\k)(<)({{identifier}})(>) + captures: + 1: keyword.other.back-reference.regexp + 2: punctuation.definition.group.named.begin.regexp + 3: variable.other.group.regexp + 4: punctuation.definition.group.named.end.regexp + + character-class: + - match: '\\[wWsSdD]|\.' + scope: constant.other.character-class.escape.backslash.regexp + - match: '(\\[pP])(\{)([[:alpha:]_]+)(?:(=)([[:alpha:]_]+)?)?(\})' + captures: + 1: constant.other.character-class.escape.unicode-property.regexp + 2: punctuation.definition.unicode-property.begin.regexp + 3: support.constant.unicode-property.regexp + 4: punctuation.separator.key-value.unicode-property.regexp + 5: support.constant.unicode-property.regexp + 6: punctuation.definition.unicode-property.end.regexp + - match: '\\([trnvf0\\]|c[A-Z]|x[\da-fA-F]{2}|u[\da-fA-F]{4}|.)' + scope: constant.character.escape.backslash.regexp + + character-class-definition: + - match: '(\[)(\^)?' + captures: + 1: punctuation.definition.character-class.begin.regexp + 2: keyword.operator.negation.regexp + push: + - meta_scope: constant.other.character-class.set.regexp + - match: '\]' + scope: punctuation.definition.character-class.end.regexp + pop: true + - match: |- + (?x) + (?: + (\\[wWsSdD]|\.)| + (\\(?:[trnvf0]|c[A-Z]|x[\da-fA-F]{2}|u[\da-fA-F]{4}|.))| + . + ) + (\-) + (?: + (\\[wWsSdD]|\.)| + (\\(?:[trnvf0]|c[A-Z]|x[\da-fA-F]{2}|u[\da-fA-F]{4}|.))| + [^]] + ) + scope: constant.other.character-class.range.regexp + captures: + 1: constant.other.character-class.escape.backslash.regexp + 2: constant.character.escape.backslash.regexp + 3: punctuation.definition.range.regexp + 4: constant.other.character-class.escape.backslash.regexp + 5: constant.character.escape.backslash.regexp + - include: character-class + + group-assertion: + - match: (\()((\?=)|(\?!)|(\?<=)|(\?))? + captures: + 1: punctuation.definition.group.begin.regexp + 2: punctuation.definition.group.no-capture.regexp + 3: punctuation.definition.group.begin.regexp + 4: punctuation.definition.group.named.begin.regexp + 5: entity.name.other.group.regexp + 6: punctuation.definition.group.named.end.regexp + push: + - meta_scope: meta.group.regexp + - match: \) + scope: punctuation.definition.group.end.regexp + pop: true + - include: main + + operator: + - match: \| + scope: keyword.operator.or.regexp + + quantifier: + - match: '[?*+]\??' + scope: keyword.operator.quantifier.regexp + + - match: '\{(\d+)(?:(,)(\d+)?)?\}' + scope: keyword.operator.quantifier.regexp + captures: + 1: constant.literal.numeric.regexp + 2: punctuation.separator.comma.regexp + 3: constant.literal.numeric.regexp + + - match: \{(,)(\d+)\} + scope: keyword.operator.quantifier.regexp + captures: + 1: punctuation.separator.comma.regexp + 2: constant.literal.numeric.regexp diff --git a/support/Symbol List Banned.tmPreferences b/support/Symbol List Banned.tmPreferences new file mode 100644 index 0000000..8ed3f14 --- /dev/null +++ b/support/Symbol List Banned.tmPreferences @@ -0,0 +1,16 @@ + + + + name + Symbol List Banned + scope + source.js meta.function.anonymous + settings + + showInIndexedSymbolList + 0 + showInSymbolList + 0 + + + diff --git a/support/Symbol List Function.tmPreferences b/support/Symbol List Function.tmPreferences new file mode 100644 index 0000000..442f40b --- /dev/null +++ b/support/Symbol List Function.tmPreferences @@ -0,0 +1,16 @@ + + + + name + Symbol List Function + scope + source.js meta.function.declaration, source.js entity.name.class + settings + + showInSymbolList + 1 + symbolTransformation + s/\s+/ /g; + + +