comparison nanorc.d/fortran.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 Fortran 90/95
2
3 syntax "Fortran" "\.([Ff]|[Ff]90|[Ff]95|[Ff][Oo][Rr])$"
4
5 #color red "\<[A-Z_]a[0-9A-Z_]+\>"
6 color red "\<[0-9]+\>"
7
8 icolor green "\<(action|advance|all|allocatable|allocated|any|apostrophe)\>"
9 icolor green "\<(append|asis|assign|assignment|associated|character|common)\>"
10 icolor green "\<(complex|data|default|delim|dimension|double precision)\>"
11 icolor green "\<(elemental|epsilon|external|file|fmt|form|format|huge)\>"
12 icolor green "\<(implicit|include|index|inquire|integer|intent|interface)\>"
13 icolor green "\<(intrinsic|iostat|kind|logical|module|none|null|only)\>"
14 icolor green "\<(operator|optional|pack|parameter|pointer|position|private)\>"
15 icolor green "\<(program|public|real|recl|recursive|selected_int_kind)\>"
16 icolor green "\<(selected_real_kind|subroutine|status)\>"
17
18 icolor cyan "\<(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\>"
19 icolor cyan "\<(close|contains|count|cpu_time|cshift|date_and_time)\>"
20 icolor cyan "\<(deallocate|digits|dot_product|eor|eoshift|function|iachar)\>"
21 icolor cyan "\<(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\>"
22 icolor cyan "\<(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\>"
23 icolor cyan "\<(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\>"
24 icolor cyan "\<(open|pad|present|print|product|pure|quote|radix)\>"
25 icolor cyan "\<(random_number|random_seed|range|read|readwrite|replace)\>"
26 icolor cyan "\<(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\>"
27 icolor cyan "\<(spread|sum|system_clock|target|transfer|transpose|trim)\>"
28 icolor cyan "\<(ubound|unpack|verify|write|tiny|type|use|yes)\>"
29
30 icolor yellow "\<(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\>"
31 icolor yellow "\<(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\>"
32 icolor yellow "\<(.or.|repeat|select case|then|where|while)\>"
33
34 icolor magenta "\<(continue|cycle|exit|go?to|result|return)\>"
35
36 #Operator Color
37 color yellow "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
38
39 #Parenthetical Color
40 color magenta "[(){}]" "\[" "\]"
41
42 # Add preprocessor commands.
43 color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
44
45 ## String highlighting.
46 icolor cyan "<[^= ]*>" ""(\\.|[^"])*""
47 icolor cyan "<[^= ]*>" "'(\\.|[^"])*'"
48
49 ## Comment highlighting
50 icolor brightred "!.*$" "(^[Cc]| [Cc]) .*$"
51
52 ## Trailing spaces
53 color ,green "[[:space:]]+$"