This is the first push to this repo with my dotfiles
[dotfilesold/.git] / .nano / js.nanorc
1 ### all *js files  ( e.g. Firefox user.js, prefs.js )
2
3 ## Old version
4
5 #syntax "JavaScript" "(\.|/|)js$"
6 #color green "//.*$" start="\/\*" end="\*\/"
7 #color blue "'(\\.|[^'])*'"
8 #color red ""(\\.|[^\"])*""
9 #color brightgreen "\<(true)\>"
10 #color brightred "\<(false)\>" "http\:\/\/.*$"
11 #color brightmagenta "[0-9](\\.|[^\"])*)"
12
13 ## New updated taken from http://wiki.linuxhelp.net/index.php/Nano_Syntax_Highlighting
14
15 syntax "JavaScript" "\.(js)$"
16 comment "//"
17
18 ## Default
19 color white "^.+$"
20
21 ## Decimal, cotal and hexadecimal numbers
22 color yellow "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>"
23
24 ## Floating point number with at least one digit before decimal point
25 color yellow "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
26 color yellow "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
27
28 ## Keywords
29 color green "\<(break|case|catch|continue|default|delete|do|else|finally)\>"
30 color green "\<(for|function|if|in|instanceof|new|null|return|switch)\>"
31 color green "\<(switch|this|throw|try|typeof|undefined|var|void|while|with)\>"
32 color green "\<(import|as|from|export)\>"
33 color green "\<(const|let|class|extends|of|get|set|await|async|yield)\>"
34
35 ## Type specifiers
36 color red "\<(Array|Boolean|Date|Enumerator|Error|Function|Math)\>"
37 color red "\<(WeakMap|Map|WeakSet|Set|Symbol|Promise)\>"
38 color red "\<(Number|Object|RegExp|String)\>"
39 color red "\<(true|false)\>"
40
41 ## String
42 color brightyellow "L?\"(\\"|[^"])*\""
43 color brightyellow "L?'(\'|[^'])*'"
44
45 ## Trailing spaces
46 color ,green "[[:space:]]+$"
47
48 ## Escapes
49 color red "\\[0-7][0-7]?[0-7]?|\\x[0-9a-fA-F]+|\\[bfnrt'"\?\\]"
50
51 ## Comments
52 color brightblue start="/\*" end="\*/"
53 color brightblue "^\s*//.*$"