mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 14:20:46 +03:00
b9f472a905
An @command must either start at the beginning of the line and be followed by whitespace or EOL, or it must be followed by a brace. Colorizing just any "@text" string colored too much.
32 lines
834 B
Plaintext
32 lines
834 B
Plaintext
## Syntax highlighting for Texinfo files.
|
|
|
|
## Original author: Benno Schulenberg
|
|
## License: GPL version 3 or newer
|
|
|
|
syntax texinfo "\.texi$"
|
|
header "^\\input texinfo"
|
|
magic "Texinfo source"
|
|
comment "@c "
|
|
|
|
# How the manual gets listed in the directory node.
|
|
color purple start="^@direntry" end="^@end direntry"
|
|
|
|
# Command arguments, trailing and enclosed.
|
|
color cyan "^@[a-z]+[[:space:]]+.*"
|
|
color lightmagenta "@([a-z]+|,|H|U)\{([^}]|@\}|@[a-z]+\{[^}]*\})*\}"
|
|
# Commands themselves.
|
|
color yellow "^@[a-z]+([[:space:]]|$)|@([a-z]+|,|H|U|AA|AE|DH|L|OE?|(La)?TeX|TH)\{|\}"
|
|
color pink "@[!"'&*./:=?@\^`{}~-]"
|
|
|
|
# Special separator for headings and footings.
|
|
color mint "@\|"
|
|
|
|
# Menu items.
|
|
color brightred "^\*[[:space:]]+.*::.*"
|
|
|
|
# Comments.
|
|
color green "@c(omment)?[[:space:]]+.*"
|
|
|
|
# Trailing whitespace.
|
|
color ,green "[[:space:]]+$"
|