-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyaml.nanorc
43 lines (30 loc) · 873 Bytes
/
yaml.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
# Syntax highlighting for YAML.
syntax yaml "\.ya?ml$"
header "^%YAML 1\.[0-2] *$"
comment "# "
tabgives " "
# Headers.
color red "^%YAML 1\.[0-9]( |$)"
# Separators.
color blue "^---( |$)"
color blue "^\.\.\.( |$)"
# Core Schema.
color yellow "\<(null|Null|NULL|~|true|True|TRUE|false|False|FALSE)\>"
color yellow "(\.nan|\.NaN|\.NAN)"
color yellow "[+-]?([0-9]+|(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?)"
color yellow "[+-]?(\.inf|\.Inf|\.INF)"
color yellow "(0o[0-7]+|0x[0-9a-fA-F]+)"
# Strings.
color green ""([^"\]|\\.)*""
color green "'([^'\]|\\.)*'"
# Maps.
color blue "^ *(- )*([^]@`,[{}"']+|"([^"\]|\\.)*"|'([^'\]|\\.)*'):( |$)"
# Lists.
color blue "^ *(- )+"
# Block Scalars.
color magenta " [|>][+-]?[1-9]? *$"
# Comments.
color red "^ *#.*$"
color red "[ ]#("([^"\]|\\.)*"|'([^'\]|\\.)*'|[^"'])*$"
# Trailing whitespaces.
color ,green " +$"