Mercurial > repos > other > linux
comparison nanorc.d/gentoo.nanorc @ 84:b989099cde9f
Start to update Nano colourisation
Defaults are REALLY basic
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 31 Mar 2018 21:06:21 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
83:966d8f8f89d0 | 84:b989099cde9f |
---|---|
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 "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\>" | |
8 color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" | |
9 color green "-(e|d|f|r|g|u|w|x|L)\>" | |
10 color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" | |
11 ## Highlight variables ... official portage ones in red, all others in bright red | |
12 color brightred "\$\{?[a-zA-Z_0-9]+\}?" | |
13 color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>" | |
14 color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>" | |
15 ## Highlight portage commands | |
16 color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*" | |
17 color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\>" | |
18 color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>" | |
19 color brightblue "\<(do|new)(ins|s?bin|doc|lib(\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>" | |
20 color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>" | |
21 color brightblue "prepall(docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)" | |
22 color brightblue "\<(doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>" | |
23 ## Highlight common commands used in ebuilds | |
24 color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>" | |
25 ## Highlight comments (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 "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\>" | |
44 color white "[[:space:]][~-]?\*" | |
45 ## Categories: | |
46 color cyan "^[[:space:]]*.*/" | |
47 ## Masking regulators: | |
48 color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)" | |
49 ## Comments: | |
50 color yellow "#.*$" |