]> git.lizzy.rs Git - micro.git/blob - syntax_files/gentoo.micro
Proper window resize handling
[micro.git] / syntax_files / gentoo.micro
1 ## Here is an example for ebuilds/eclasses
2 ##
3 syntax "Ebuild" "\.e(build|class)$"
4 ## All the standard portage functions
5 color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
6 ## Highlight bash related syntax
7 color green "\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"
8 color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
9 color green "-(e|d|f|r|g|u|w|x|L)\b"
10 color green "-(eq|ne|gt|lt|ge|le|s|n|z)\b"
11 ## Highlight variables ... official portage ones in red, all others in bright red
12 color brightred "\$\{?[a-zA-Z_0-9]+\}?"
13 color red "\b(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\b"
14 color red "\b(S|D|T|PV|PF|P|PN|A)\b" "\bC(XX)?FLAGS\b" "\bLDFLAGS\b" "\bC(HOST|TARGET|BUILD)\b"
15 ## Highlight portage commands
16 color magenta "\buse(_(with|enable))?\b [!a-zA-Z0-9_+ -]*" "inherit.*"
17 color brightblue "\be(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\b"
18 color brightblue "\bdie\b" "\buse(_(with|enable))?\b" "\binherit\b" "\bhas\b" "\b(has|best)_version\b" "\bunpack\b"
19 color brightblue "\b(do|new)(ins|s?bin|doc|lib(\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\b"
20 color brightblue "\bdo(python|sed|dir|hard|sym|html|jar|mo)\b" "\bkeepdir\b"
21 color brightblue "prepall(docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
22 color brightblue "\b(doc|ins|exe)into\b" "\bf(owners|perms)\b" "\b(exe|ins|dir)opts\b"
23 ## Highlight common commands used in ebuilds
24 color blue "\bmake\b" "\b(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\b"
25 ## Highlight brightblacks (doesnt work that well)
26 color yellow "#.*$"
27 ## Highlight strings (doesnt work that well)
28 color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
29 ## Trailing space is bad!
30 color ,green "[[:space:]]+$"
31
32 ## Here is an example for Portage control files
33 ##
34 syntax "etc-portage" "\.(keywords|mask|unmask|use)$"
35 ## Base text:
36 color green "^.+$"
37 ## Use flags:
38 color brightred "[[:space:]]+\+?[a-zA-Z0-9_-]+"
39 color brightblue "[[:space:]]+-[a-zA-Z0-9_-]+"
40 ## Likely version numbers:
41 color magenta "-[[:digit:]].*([[:space:]]|$)"
42 ## Accepted arches:
43 color white "[~-]?\b(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\b"
44 color white "[[:space:]][~-]?\*"
45 ## Categories:
46 color cyan "^[[:space:]]*.*/"
47 ## Masking regulators:
48 color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)"
49 ## Comments:
50 color yellow "#.*$"