From 85ab6224827ff8a93e9059c0a87946368b97ce32 Mon Sep 17 00:00:00 2001 From: mataha Date: Sun, 5 Nov 2023 21:55:38 +0100 Subject: [PATCH] Add support for `TM_COMMENT_CASE_INSENSITIVE` Proposed in a GitHub issue[1] and introduced in Sublime Text 4153[2]. [1]: https://github.com/sublimehq/sublime_text/issues/6001 [2]: https://www.sublimetext.com/dev#changelog:~:text=TM_COMMENT_CASE_INSENSITIVE --- .../Completions/shellVariable Name.sublime-completions | 8 ++++++++ .../TextMate Preferences.sublime-syntax | 2 +- .../TextMate Preferences/syntax_test_tmPreferences.xml | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Package/TextMate Preferences/Completions/shellVariable Name.sublime-completions b/Package/TextMate Preferences/Completions/shellVariable Name.sublime-completions index 90a78ff8..ed8863d8 100644 --- a/Package/TextMate Preferences/Completions/shellVariable Name.sublime-completions +++ b/Package/TextMate Preferences/Completions/shellVariable Name.sublime-completions @@ -1,6 +1,14 @@ { "scope": "meta.shellVariable.name.tmPreferences - (meta.tag - punctuation.definition.tag.begin.xml)", "completions": [ + { + "trigger": "TM_COMMENT_CASE_INSENSITIVE", + "kind": ["variable", "v", "shellVariable"], + }, + { + "trigger": "TM_COMMENT_CASE_INSENSITIVE_2", + "kind": ["variable", "v", "shellVariable"], + }, { "trigger": "TM_COMMENT_DISABLE_INDENT", "kind": ["variable", "v", "shellVariable"], diff --git a/Package/TextMate Preferences/TextMate Preferences.sublime-syntax b/Package/TextMate Preferences/TextMate Preferences.sublime-syntax index 8b8a3828..47f7ce2f 100644 --- a/Package/TextMate Preferences/TextMate Preferences.sublime-syntax +++ b/Package/TextMate Preferences/TextMate Preferences.sublime-syntax @@ -459,7 +459,7 @@ contexts: - include: string-end - include: value-content - include: comments - - match: \bTM_COMMENT_(?:START|END|DISABLE_INDENT)(?:_[2-9])?\b + - match: \bTM_COMMENT_(?:START|END|DISABLE_INDENT|CASE_INSENSITIVE)(?:_[2-9])?\b scope: entity.name.constant.shellVariable.tmPreferences support.constant.shellVariable.tmPreferences push: after-number - match: \b\w+\b diff --git a/Package/TextMate Preferences/syntax_test_tmPreferences.xml b/Package/TextMate Preferences/syntax_test_tmPreferences.xml index 10b9f059..98159817 100644 --- a/Package/TextMate Preferences/syntax_test_tmPreferences.xml +++ b/Package/TextMate Preferences/syntax_test_tmPreferences.xml @@ -134,6 +134,14 @@ yes + + name + TM_COMMENT_CASE_INSENSITIVE_2 + + value + yes + + name test