2012-11-08 20:09:19 +01:00
|
|
|
## CMake syntax highlighter for GNU Nano
|
|
|
|
##
|
2016-03-02 20:49:58 +01:00
|
|
|
syntax "CMake" "(CMakeLists\.txt|\.cmake)$"
|
2012-11-08 20:09:19 +01:00
|
|
|
|
|
|
|
icolor green "^[[:space:]]*[A-Z0-9_]+"
|
2018-08-09 10:09:19 +02:00
|
|
|
icolor yellow "^[[:space:]]*(include|include_directories|include_external_msproject)\>"
|
2012-11-08 20:09:19 +01:00
|
|
|
|
2018-08-09 10:09:19 +02:00
|
|
|
icolor green "^[[:space:]]*\<((else|end)?if|else|(end)?while|(end)?foreach|break)\>"
|
|
|
|
color green "\<(COPY|NOT|COMMAND|PROPERTY|POLICY|TARGET|EXISTS|IS_(DIRECTORY|ABSOLUTE)|DEFINED)\>[[:space:]]"
|
|
|
|
color green "[[:space:]]\<(OR|AND|IS_NEWER_THAN|MATCHES|(STR|VERSION_)?(LESS|GREATER|EQUAL))\>[[:space:]]"
|
2012-11-08 20:09:19 +01:00
|
|
|
|
2018-08-09 10:09:19 +02:00
|
|
|
icolor red "^[[:space:]]*\<((end)?(function|macro)|return)"
|
2012-11-08 20:09:19 +01:00
|
|
|
|
2012-11-08 20:22:38 +01:00
|
|
|
#String Color
|
|
|
|
color cyan "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
|
|
|
|
color cyan "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
|
|
|
|
|
2018-08-09 10:09:19 +02:00
|
|
|
icolor red start="\$(\{|ENV\{)" end="\}"
|
2012-11-08 20:09:19 +01:00
|
|
|
color magenta "\<(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\>"
|
|
|
|
|
2018-08-09 10:09:19 +02:00
|
|
|
icolor blue "^([[:space:]]*)?#.*"
|
|
|
|
icolor blue "[[:space:]]#.*"
|
2016-06-12 18:48:32 +02:00
|
|
|
|
|
|
|
## Trailing whitespace
|
|
|
|
color ,green "[[:space:]]+$"
|