diff --git a/LaTeX/TeX.sublime-syntax b/LaTeX/TeX.sublime-syntax index c1fdad01145..16172c73d6f 100644 --- a/LaTeX/TeX.sublime-syntax +++ b/LaTeX/TeX.sublime-syntax @@ -415,6 +415,11 @@ contexts: 1: punctuation.definition.backslash.tex push: def-function-expect-identifier + - match: (\\)(:?outer|long|global){{endcs}} + scope: storage.modifier.definition.tex + captures: + 1: punctuation.definition.backslash.tex + def-function-expect-identifier: - meta_scope: meta.function.tex - match: (?=\\) diff --git a/LaTeX/syntax_test_tex.tex b/LaTeX/syntax_test_tex.tex index a4d9475b86c..77102f50c25 100644 --- a/LaTeX/syntax_test_tex.tex +++ b/LaTeX/syntax_test_tex.tex @@ -112,6 +112,27 @@ \deftext %^^^^^^^ support.function.general.tex +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Modifiers +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + \long\def\test#1{#1} +%^^^^^ storage.modifier.definition.tex +%^ punctuation.definition.backslash.tex +% ^^^^ meta.function.tex keyword.declaration.function.tex storage.modifier.definition.tex + + \outer\def\test#1{#1} +%^^^^^^ storage.modifier.definition.tex +%^ punctuation.definition.backslash.tex +% ^^^^ meta.function.tex keyword.declaration.function.tex storage.modifier.definition.tex + + \global\def\test#1{#1} +%^^^^^^^ storage.modifier.definition.tex +%^ punctuation.definition.backslash.tex +% ^^^^ meta.function.tex keyword.declaration.function.tex storage.modifier.definition.tex + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Macro definition contents