summaryrefslogtreecommitdiffstats
path: root/misc/syntax/syntax.syntax
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:12 +0000
commit8ccb487c21368a7fdc8c7c72315325bf0aa06147 (patch)
treeb2056fae01d325924508a41731edfbd4c3cddd23 /misc/syntax/syntax.syntax
parentInitial commit. (diff)
downloadmc-8ccb487c21368a7fdc8c7c72315325bf0aa06147.tar.xz
mc-8ccb487c21368a7fdc8c7c72315325bf0aa06147.zip
Adding upstream version 3:4.8.29.upstream/3%4.8.29upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'misc/syntax/syntax.syntax')
-rw-r--r--misc/syntax/syntax.syntax60
1 files changed, 60 insertions, 0 deletions
diff --git a/misc/syntax/syntax.syntax b/misc/syntax/syntax.syntax
new file mode 100644
index 0000000..fd6d132
--- /dev/null
+++ b/misc/syntax/syntax.syntax
@@ -0,0 +1,60 @@
+# Syntax highlighting rules for syntax highlighting rules
+
+# Use \[\] at the end of keywords to suppress their special meaning
+
+wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.\\[]{}
+
+context default
+# Invalid combinations, not highlighted
+ keyword whole linestart\[\t\s\]whole
+ keyword whole linestart\[\t\s\]wholeleft
+ keyword whole linestart\[\t\s\]wholeright
+
+# Combinations below are valid
+ keyword whole whole\[\t\s\]linestart brightcyan
+ keyword whole wholeleft\[\t\s\]linestart brightcyan
+ keyword whole wholeright\[\t\s\]linestart brightcyan
+ keyword whole whole\[\] brightcyan
+ keyword whole wholeleft\[\] brightcyan
+ keyword whole wholeright\[\] brightcyan
+ keyword whole linestart\[\] brightcyan
+
+ keyword whole wholechars\[\t\s\]left brightcyan
+ keyword whole wholechars\[\t\s\]right brightcyan
+ keyword whole wholechars\[\] brightcyan
+ keyword whole define\[\] brightcyan
+
+ keyword whole spellcheck\[\] yellow
+ keyword whole keyword\[\] yellow
+ keyword whole context\[\t\s\]exclusive brightred
+ keyword whole context\[\t\s\]default brightred
+ keyword whole context\[\] brightred
+ keyword whole caseinsensitive\[\] brightred
+
+ keyword whole linestart file\[\] brightgreen
+ keyword whole linestart include\[\] brightred
+
+ keyword whole black black blue
+ keyword whole red red
+ keyword whole green green
+ keyword whole brown brown
+ keyword whole blue blue black
+ keyword whole magenta magenta
+ keyword whole cyan cyan
+ keyword whole lightgray lightgray
+ keyword whole gray gray black
+ keyword whole brightred brightred
+ keyword whole brightgreen brightgreen
+ keyword whole yellow yellow
+ keyword whole brightblue brightblue black
+ keyword whole brightmagenta brightmagenta
+ keyword whole brightcyan brightcyan
+ keyword whole white white
+
+context linestart # \n brown
+ spellcheck
+
+# Ideally we would have defined comments with "context linestart \[\s\]# ...",
+# but contexts can't start with a character class. So we define comments twice.
+context linestart \s\[\s\]# \n brown
+ spellcheck