mirror of
https://github.com/scopatz/nanorc
synced 2024-11-27 12:25:53 +01:00
062c6f0f4d
Nano warns of color needing a syntax definition preceding it. This is solved by putting "prolog" in quotes at the top of the file. Nano also complains about the color normal, so I changed it to "white"
36 lines
733 B
Plaintext
36 lines
733 B
Plaintext
## Here is a prolog example.
|
|
|
|
syntax "prolog" "\.pl"
|
|
comment "%"
|
|
|
|
# Reset everything
|
|
color white ".*"
|
|
|
|
# Integers and floats
|
|
color yellow "(^| |=)[0-9]+\.?[0-9]*"
|
|
|
|
# Variables
|
|
color red "(^|[[:blank:]]|\(|,)[A-Z]+"
|
|
color red "(^|[[:blank:]]|\(|,)_[0-9a-zA-Z_]+($|[[:blank:]]|,|\))"
|
|
|
|
# Anonymous variable '_'
|
|
color yellow "(^|[[:blank:]]|\(|,)_($|[[:blank:]]|,|\))"
|
|
|
|
# Functions
|
|
color cyan "(^|[[:blank:]])\w+\("
|
|
color white "\(|\)|\[|\]|,|=|\\="
|
|
|
|
# Atoms
|
|
color green start="\"" end="\""
|
|
color green start="'" end="'"
|
|
|
|
# Comments
|
|
color white "(^|[[:blank:]])%.*$"
|
|
color white start="/\*" end="\*/"
|
|
|
|
# Reminders
|
|
color black,yellow "(BUG|DEBUG|FIXME|IDEA|NOTE|REVIEW|TEMP|TODO|WARNING|XXX)"
|
|
|
|
# Spaces in front of tabs
|
|
color ,red " + +"
|