-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.nanorc
175 lines (140 loc) · 8.99 KB
/
.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
## Here is an example for C/C++.
##
syntax "c" "\.(c|C|cc|cu|cpp|cxx|h|H|hh|hpp|hxx)$"
color brightred "\<[A-Z_][0-9A-Z_]+\>"
color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>"
color green "\<(u_?)?int(8|16|32|64|ptr)_t\>"
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
color magenta "\<(goto|continue|break|return)\>"
color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
##
## GCC builtins
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak|global|shared|device)__"
color cyan "dim3"
##
## String highlighting. You will in general want your comments and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
##
## This string is VERY resource intensive!
color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
## Comment highlighting
color brightblue "//.*"
color brightblue start="/\*" end="\*/"
##kernel launch tags
color brightyellow start="<<<" end=">>>"
## Here is a short example for TeX files.
##
syntax "tex" "\.tex$"
icolor green "\\.|\\[A-Z]*"
color magenta "[{}]"
color blue "(^|[^\])%.*"
## Here is an example for Fortran 90/95
syntax "fortran" "\.(f|f90|f95|F90)$"
#color red "\<[A-Z_]a[0-9A-Z_]+\>"
color red "\<[0-9]+\>"
icolor green "\<(action|advance|all|allocatable|allocated|any|apostrophe)\>"
icolor green "\<(append|asis|assign|assignment|associated|character|common)\>"
icolor green "\<(complex|data|default|delim|dimension|double precision)\>"
icolor green "\<(elemental|epsilon|external|file|fmt|form|format|huge)\>"
icolor green "\<(implicit|include|index|inquire|integer|intent|interface)\>"
icolor green "\<(intrinsic|iostat|kind|logical|module|none|null|only)>"
icolor green "\<(operator|optional|pack|parameter|pointer|position|private)\>"
icolor green "\<(program|public|real|recl|recursive|selected_int_kind)\>"
icolor green "\<(selected_real_kind|subroutine|status)\>"
icolor cyan "\<(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\>"
icolor cyan "\<(close|contains|count|cpu_time|cshift|date_and_time)\>"
icolor cyan "\<(deallocate|digits|dot_product|eor|eoshift|function|iachar)\>"
icolor cyan "\<(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\>"
icolor cyan "\<(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\>"
icolor cyan "\<(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\>"
icolor cyan "\<(open|pad|present|print|product|pure|quote|radix)\>"
icolor cyan "\<(random_number|random_seed|range|read|readwrite|replace)\>"
icolor cyan "\<(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\>"
icolor cyan "\<(spread|sum|system_clock|target|transfer|transpose|trim)\>"
icolor cyan "\<(ubound|unpack|verify|write|tiny|type|use|yes)\>"
icolor yellow "\<(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\>"
icolor yellow "\<(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\>"
icolor yellow "\<(.or.|repeat|select case|then|where|while)\>"
icolor magenta "\<(continue|cycle|exit|go?to|result|return)\>"
## String highlighting.
icolor yellow "<[^= ]*>" ""(\\.|[^"])*""
## Comment highlighting
icolor blue "!.*"
## PHP Syntax Highlighting
syntax "php" "\.php[2345s~]?$"
color white start="<\?(php|=)?" end="\?>"
# Constructs
color magenta "\<(class|new|private|public|function|for|foreach|if|while|do|else|elseif|case|default|switch)\>"
color magenta "\<(goto|continue|break|return)\>"
# Variables
color white "\$[a-zA-Z_0-9$]*|[=!<>]"
color white "\->[a-zA-Z_0-9$]*|[=!<>]"
# Special Variables
color brightblue "(\$this|parent::|self::|\$this-\>)"
# STRINGS!
color brightyellow "<[^= ]*>" ""(\.|[^"])*""
#color brightyellow "('.*'|\".*\")"
# Comments
color blue start="/\*" end="\*/"
color blue "(//.*)$"
## Here is an example for Java.
##
syntax "java" "\.java$"
color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
color yellow "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
color brightyellow ""[^"]*""
color yellow "\<(true|false|null)\>"
color blue "//.*"
color blue start="/\*" end="\*/"
color brightblue start="/\*\*" end="\*/"
syntax "matlab" "\.m?$"
color brightred "\b([0-9]+[Ee][-]?[0-9]+|([0-9]*\.[0-9]+|[0-9]+\.)([Ee][-]?[0-9]+)?)[fFlL]?"
color brightgreen "\<(size|zeros|ones|min|max|varargs|sqrt|atan2|asin|acos|log10|log|real|error|isscalar|isstr|strcmp|log2|Inf|isvector|strcat|fsolve|islogical|isempty|isnumeric|prod|round|dims|cumprod|ismatrix|floor|sort|ceil|linspace|isnan|isinf|nan_inf|repmat|colums|rows|sum|rem|reshape|conv|length|usage|log2|abs|setstr|printf|sprintf|fprintf|fread|fopen|fclose|system|unlink)\>"
color magenta "\<(function|endfunction|switch|case|endswitch|otherwise|unwind_protect|unwind_protect_cleanup|end_unwind_protect|try|catch|end_try_catch|end|if|else|elseif|endif|break|continue|for|endfor|return|do|until|while|endwhile|global|nargin|nargout|assert)\>"
color brightred "\<(function|endfunction|global|for|end|while|if|else|elseif|endif|break|switch|case|and|or|and)\>"
color brightyellow "\<(info|whatsnew|hostid|help|lookfor|what|which|type|edit|pcode|quit|exit|who|whos|save|load|memory|clear|pack|workspace|pathdef|path|addpath|echo|format|diary|pwd|cd|dir)\>"
color brightgreen "\<(logical|isnumeric|islogical|isempty|isequal|reshape|repmat|find|length|size|cross|kron|linspace|logspace|meshgrid|zeros|ones|rand|randn|end|ind2sub|sub2ind|repmat|cat|ndims|ndgrid|permute|ipermute|shiftdim|flipdim|squeeze|struct|fieldnames|getfield|setfield|rmfield|isfield|isstruct|cell|celldisp|cellplot|cellstr|deal|iscell|num2cell|cell2struct|struct2cell|lists|varargin|varargout|inline|argnames|formula|char|vectorsize|class|isa|isobject|methods|inferioto|superioto|horzcat|vertcat|subsref|subsasgn|subsindex)\>"
color brightgreen "\<(ans|inf|NaN|Pi|eps|log2|pow2|realmin|realmax|all|any|exist|bitset|bitget|bitmax|bitcmp|bitand|bitor|bitxor|bitshift|ismember|unique|union|intersect|setdiff|setxor|eval|feval|builtin|assignin|evalin|run|nargchk|nargin|nargout|inputname|input|pause|error|warning|lasterr|lastwarn|disp|fprintf|sprintf)\>"
color brightgreen "\<(abs|angle|real|imag|conj|cplxpair|ceil|fix|floor|round|mod|rem|sign|factor|primes|gcd|lcm|rat|rats|perms|nchoosek|sqrt|exp|log|pow2|nextpow|log2|log10|sin|sinh|asin|asinh|csc|csch|ascc|ascch|cos|cosh|acos|acosh|sec|sech|asec|asech|tan|tanh|atan|atan2|atanh|cot|coth|acot|acoth|cart2pol|cart2sph|pol2cartsph2cart|besselj|bessely|besseli|besselk|besselh|airy|beta|betainc|betaln|ellipj|ellipke|erf|erfc|erfcx|erfinv|gamma|gammainc|gammaln|expint|legendre)\>"
color brightgreen "\<(eye|diag|tril|triu|fliplr|flipud|rot90|compan|cond|normest|norm|det|see|rank|trace|null|orth|inv|lu|qr|svd|gsvd|roots|poly)\>"
color brightgreen "\<(sum|cumsum|prod|cumprod|sort|sortrows|max|min|median|mean|std|cov|corrcoef|diff|gradient|polyfit|interpft|spline|ppval|fft|ifft|fft2|ifft2|fftn|ifftn|filter|filter2)\>"
color brightred "\<(root|figure|axes|line|patch|surface|text|plot|fplot|ezplot|loglog|semilogx|semilogy|polar|piotyy|plot3|meshgrid|mesh|meshc|meshz|axis|hold|grid|bar|barh|pie|subplot|zoom|colormap|label|legend|errorbar|hist|stem|stairs|scatter|roze)\>"
##color red "\{[0-9:(end)-+]*?\}"
##color red "\([0-9:(end)-+\[\]]*?\)"
color red "[\{\}\(\)]"
##
##
## String highlighting. You will in general want your comments and
## strings to come last, because syntax highlighting rules will be
## applied in the order they are read in.
##
## Comment highlighting
color cyan "%.*"
## string highlighting
color yellow "(\s|,|\[|\()'.*?'(\)|,|\s|\])"
##color yellow "'.*'"
color white "\[" "\]" "[\*+-=<>;\\/\.\^!&|,]"
icolor green "\\.|\\[A-Z]*"
syntax "python" "\.py$"
#icolor brightred "def [ 0-9A-Z_]+"
## Python keywords
color cyan "\<(and|as|assert|class|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|try|while|with|yield)\>"
color magenta "\<(break|continue|return)\>"
# Python objects
color green "\<(str|bytearray|bytes|list|tuple|set|frozenset|dict|int|float|complex|bool)\>"
## Operators
#color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
## Braces and parentheses
#color magenta "[(){}]" "\[" "\]"
# Python strings
color brightyellow "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color brightyellow "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
color brightyellow start=""""[^"]" end=""""" start="'''[^']" end="'''"
## Comments
color brightblue "#.*$"