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