aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-06-27 09:55:22 +0000
committerJoursoir <chat@joursoir.net>2021-06-27 09:58:46 +0000
commit3b4d3c634cee8060fa792a93cc49f6e439cd38ec (patch)
treee03a4982357e111c189230ac71e253e65cdf36eb
parent385e5f3d86c48ce2f5847290c7b56934b39eaad1 (diff)
downloadsubl-syntax-man-3b4d3c634cee8060fa792a93cc49f6e439cd38ec.tar.gz
subl-syntax-man-3b4d3c634cee8060fa792a93cc49f6e439cd38ec.tar.bz2
subl-syntax-man-3b4d3c634cee8060fa792a93cc49f6e439cd38ec.zip
handle line with control char
* use separate context
-rw-r--r--man.sublime-syntax18
1 files changed, 16 insertions, 2 deletions
diff --git a/man.sublime-syntax b/man.sublime-syntax
index cb38ccc..e03aa83 100644
--- a/man.sublime-syntax
+++ b/man.sublime-syntax
@@ -17,8 +17,7 @@ variables:
contexts:
main:
- - match: '{{cc}}{{macro}}'
- scope: keyword.control.man
+ - match: (?={{cc}})
push: macros
- match: '{{cc}}(?={{font_style}})\b'
@@ -43,6 +42,18 @@ contexts:
macros:
+ - match: '{{cc}}{{macro}}'
+ scope: keyword.control.man
+ push: macros_line
+ pop: true
+
+ - match: '{{cc}}\w+\b'
+ scope: support.function.groff
+ push: macros_line
+ pop: true
+
+
+ macros_line:
- match: '"'
scope: punctuation.definition.string.begin.man
push: string
@@ -50,6 +61,9 @@ contexts:
- match: '{{numeric}}'
scope: constant.numeric.man
+ - match: \w
+ scope: variable.parameter.man
+
- match: $
pop: true