Mercurial > repos > other > linux
comparison nanorc.d/c.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 C/C++. | |
2 ## | |
3 syntax "C" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$" | |
4 color brightred "\<[A-Z_][0-9A-Z_]+\>" | |
5 color green "\<(float|double|bool|char|wchar_t|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>" | |
6 color green "\<((s?size)|(char(16|32))|((u_?)?int(8|16|32|64|ptr)))_t\>" | |
7 color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>" | |
8 color green "\<(for|if|while|do|else|case|default|switch)\>" | |
9 color green "\<(try|throw|catch|operator|new|delete)\>" | |
10 color green "\<((const|dynamic|reinterpret|static)_cast)\>" | |
11 color green "\<(alignas|alignof|asm|auto|compl|concept|constexpr|decltype|export|noexcept|nullptr|requires|static_assert|thread_local|typeid|override|final)\>" | |
12 color green "\<(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\>" | |
13 color brightmagenta "\<(goto|continue|break|return)\>" | |
14 color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)" | |
15 color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" | |
16 | |
17 ## | |
18 ## GCC builtins | |
19 color green "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" | |
20 | |
21 #Operator Color | |
22 color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&" | |
23 | |
24 #Parenthetical Color | |
25 color magenta "[(){}]" "\[" "\]" | |
26 | |
27 | |
28 ## | |
29 ## String highlighting. You will in general want your comments and | |
30 ## strings to come last, because syntax highlighting rules will be | |
31 ## applied in the order they are read in. | |
32 color cyan "<[^= ]*>" ""(\\.|[^"])*"" | |
33 ## | |
34 ## This string is VERY resource intensive! | |
35 #color cyan start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" | |
36 | |
37 ## Comment highlighting | |
38 color brightblue "//.*" | |
39 color brightblue start="/\*" end="\*/" | |
40 | |
41 ## Trailing whitespace | |
42 color ,green "[[:space:]]+$" |