2010-07-28 17:15:43 -05:00
|
|
|
## Here is an example for groff.
|
|
|
|
##
|
2023-04-12 14:52:10 +08:00
|
|
|
syntax "Groff" "\.m[ems]$" "\.rof$" "\.tmac$" "^tmac."
|
2019-12-18 11:13:13 -05:00
|
|
|
comment ".\""
|
|
|
|
|
2010-07-28 17:15:43 -05:00
|
|
|
## The argument of .ds or .nr
|
2020-04-30 10:31:24 -04:00
|
|
|
color cyan "^\.(ds|nr) [^[[:space:]]]*[^[[:space:]]]*"
|
2010-07-28 17:15:43 -05:00
|
|
|
## Single character escapes
|
|
|
|
color brightmagenta "\\."
|
|
|
|
## Highlight the argument of \f or \s in the same color
|
|
|
|
color brightmagenta "\\f." "\\f\(.." "\\s(\+|\-)?[0-9]"
|
|
|
|
## Newlines
|
|
|
|
color cyan "(\\|\\\\)n(.|\(..)"
|
|
|
|
color cyan start="(\\|\\\\)n\[" end="]"
|
|
|
|
## Requests
|
2020-04-30 10:31:24 -04:00
|
|
|
color brightgreen "^\.[[:space:]]*[^[[:space:]]]*[^[[:space:]]]*"
|
2020-04-30 21:10:06 -04:00
|
|
|
color brightgreen "^\.[[:space:]]*[^[[:space:]]]*"
|
2010-07-28 17:15:43 -05:00
|
|
|
## Comments
|
|
|
|
color yellow "^\.\\".*$"
|
|
|
|
## Strings
|
|
|
|
color green "(\\|\\\\)\*(.|\(..)"
|
|
|
|
color green start="(\\|\\\\)\*\[" end="]"
|
|
|
|
## Characters
|
|
|
|
color brightred "\\\(.."
|
|
|
|
color brightred start="\\\[" end="]"
|
|
|
|
## Macro arguments
|
|
|
|
color brightcyan "\\\\\$[1-9]"
|