You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
1.7 KiB

# joe [La]TeX syntax highlighting
=Idle
=Comment green
=CommentLabel bold green
=Keyword bold
=Mathmode cyan
=Brace magenta
=Parameter bold blue
=Bad bold red
:idle Idle
* idle
"%" comment recolor=-1
"$" math recolor=-1
"\\" command recolor=-1
"{[]}" brace recolor=-1
"#" parameter recolor=-1
:comment Comment
* comment
# might be TODO label
"BFHNTX" comment noeat call=.comment_todo()
"\n" idle
:math Mathmode
* math
"\\" math_command recolor=-1
"{[]}" math_brace recolor=-1
"$" idle
:math_command Keyword
* math
"a-zA-Z@" math_command2
:math_command2 Keyword
* math noeat
"a-zA-Z@" math_command2
:parameter Parameter
* idle noeat
"0-9" idle
:brace Brace
* idle noeat
:math_brace Brace
* math noeat
:command Keyword
* idle
"a-zA-Z@" command2 buffer
:command2 Keyword
* idle noeat strings
# "begin" env_begin
"verb" verbatim
done
"a-zA-Z@" command2
:verbatim Keyword
* verbatim1 save_c
:verbatim1 Idle
* verbatim1
& end_verbatim recolor=-1
:end_verbatim Keyword
* idle noeat
#:env_begin Keyword
# * env_begin1 noeat
#:env_begin1 Idle
# * env_begin1
# "{" env_begin_brace recolor=-1
#:env_begin_brace Brace
# * env_begin_name noeat buffer
#:env_begin_name Bad
# * env_begin_name
# "}" idle noeat
.subr comment_todo
# initial state
:comment_todo_init Comment
* comment_todo_guess buffer
# highlight common TODO labels
:comment_todo_guess Comment
* comment_todo_unknown noeat strings
"BUG" comment_todo
"FIXME" comment_todo
"HACK" comment_todo
"NOTE" comment_todo
"TODO" comment_todo
"XXX" comment_todo
done
"A-Z" comment_todo_guess
:comment_todo_unknown Comment
* NULL noeat return
:comment_todo CommentLabel
* NULL noeat return
.end