2016-03-21 19:16:02 +03:00
|
|
|
## Here is an example for ebuilds/eclasses
|
|
|
|
##
|
2016-08-25 03:15:36 +03:00
|
|
|
syntax "ebuild" "\.e(build|class)$"
|
2016-03-21 19:16:02 +03:00
|
|
|
## All the standard portage functions
|
2016-08-31 19:12:23 +03:00
|
|
|
color identifier "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
|
2016-03-21 19:16:02 +03:00
|
|
|
## Highlight bash related syntax
|
2016-08-31 19:12:23 +03:00
|
|
|
color statement "\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\b"
|
|
|
|
color statement "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
|
|
|
|
color statement "-(e|d|f|r|g|u|w|x|L)\b"
|
|
|
|
color statement "-(eq|ne|gt|lt|ge|le|s|n|z)\b"
|
2016-03-21 19:16:02 +03:00
|
|
|
## Highlight variables ... official portage ones in red, all others in bright red
|
2016-08-31 19:12:23 +03:00
|
|
|
color preproc "\$\{?[a-zA-Z_0-9]+\}?"
|
|
|
|
color special "\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\b"
|
|
|
|
color special "\b(S|D|T|PV|PF|P|PN|A)\b" "\bC(XX)?FLAGS\b" "\bLDFLAGS\b" "\bC(HOST|TARGET|BUILD)\b"
|
2016-03-21 19:16:02 +03:00
|
|
|
## Highlight portage commands
|
2016-08-31 19:12:23 +03:00
|
|
|
color identifier "\buse(_(with|enable))?\b [!a-zA-Z0-9_+ -]*" "inherit.*"
|
|
|
|
color statement "\be(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\b"
|
|
|
|
color statement "\bdie\b" "\buse(_(with|enable))?\b" "\binherit\b" "\bhas\b" "\b(has|best)_version\b" "\bunpack\b"
|
|
|
|
color statement "\b(do|new)(ins|s?bin|doc|lib(\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\b"
|
|
|
|
color statement "\bdo(python|sed|dir|hard|sym|html|jar|mo)\b" "\bkeepdir\b"
|
|
|
|
color statement "prepall(docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
|
|
|
|
color statement "\b(doc|ins|exe)into\b" "\bf(owners|perms)\b" "\b(exe|ins|dir)opts\b"
|
2016-03-21 19:16:02 +03:00
|
|
|
## Highlight common commands used in ebuilds
|
2016-08-31 19:12:23 +03:00
|
|
|
color type "\bmake\b" "\b(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\b"
|
2016-03-25 23:41:36 +03:00
|
|
|
## Highlight comments (doesnt work that well)
|
2016-08-31 19:12:23 +03:00
|
|
|
color comment "#.*$"
|
2016-03-21 19:16:02 +03:00
|
|
|
## Highlight strings (doesnt work that well)
|
2016-08-31 19:12:23 +03:00
|
|
|
color constant.string ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
|