1
0
mirror of https://github.com/cmur2/joe-syntax.git synced 2024-12-11 05:04:28 +01:00
joe-syntax/tex.jsf

80 lines
1.3 KiB
Plaintext

# joe [La]TeX syntax highlighting
=Idle
=Comment green
=CommentLabel bold green
=Keyword bold
=Mathmode cyan
=Brace magenta
=Parameter bold blue
: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
:command Keyword
* idle
"a-zA-Z@" command2
:command2 Keyword
* idle noeat
"a-zA-Z@" command2
: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
.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