From 0726842a72c378e060245f9d330326ded0466ab4 Mon Sep 17 00:00:00 2001 From: yochem Date: Wed, 5 Sep 2018 10:56:49 +0200 Subject: [PATCH] Added prolog syntax highlighting --- prolog.nanorc | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 prolog.nanorc diff --git a/prolog.nanorc b/prolog.nanorc new file mode 100644 index 00000000..8475ab6a --- /dev/null +++ b/prolog.nanorc @@ -0,0 +1,35 @@ +## Here is a prolog example. + +syntax prolog "\.pl" +comment "%" + +# Reset everything +color normal ".*" + +# 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 normal "\(|\)|\[|\]|,|=|\\=" + +# 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 " + +"