From 3b4d3c634cee8060fa792a93cc49f6e439cd38ec Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sun, 27 Jun 2021 09:55:22 +0000 Subject: handle line with control char * use separate context --- man.sublime-syntax | 18 ++++++++++++++++-- 1 file 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 -- cgit v1.2.3-18-g5258