-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathPlist.txt
85 lines (82 loc) · 6.54 KB
/
Plist.txt
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
:Plist:
http://en.wikipedia.org/wiki/Property_list
File Format
Encoding = UTF-8
Line-ending-style = UNIX
Comment (XML style) i.e: <!-- some comment -->
Escape: require both
XML escape
" → "
' → '
< → <
> → >
& → &
JSON escape with \ http://en.wikipedia.org/wiki/JSON
\ → \\
" → \"
control codes (anything less than U+0020) i.e: u0010 → \u0019
Structure
Contain pairs of
<key>field_name</key>
<data_type></data_type>
data_type
<string></string> UTF-8 encoded string
<real></real> Decimal number
<integer></integer> interger number
<true/> No data
<false/> No data
<date></date> ISO 8601 formatted string
<data></data> Base64 encoded data
<array></array> Assign multiple values to 1 key. An empty array may be represented as <array/>
<dict></dict> Alternating <key> tags and plist element tags
Example: string
<key>background</key>
<string>#000000</string> //Background color = black (Hex = 000000)
Example: dict
<key>settings</key>
<dict>
<key>name</key>
<string>entity.name.function.link.external</string>
<key>match</key>
<string>(ftp:\/\/|https?:\/\/)?([\w\.-]+)\.[a-z]{2,6}(\.|\/)\S*</string>
</dict>
Example: aray
<key>fileTypes</key>
<array>
<string>reg</string>
<string>REG</string>
</array>
Example: Use array to assign multiple dict value to 1 key
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>unicode.symbol</string>
<key>match</key>
<string>°|¹|²|³|⁴|⁵|⁶|⁷|⁸|⁹</string>
</dict>
<dict>
<key>name</key>
<string>entity.name.function.link.external</string>
<key>match</key>
<string>(ftp:\/\/|https?:\/\/)?([\w\.-]+)\.[a-z]{2,6}(\.|\/)\S*</string>
</dict>
</array>
Sublime Text PList
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key> //Just a description, ST ignore this
<string>Some name here</string>
<key>scope</key> //Comma-separated list of scope names to apply to [[Scope.txt]]
<string>text.txt, meta.function.python</string>
<key>uuid</key> //Each file must have an unique ID
<string>77AC23B6-8A90-11D9-BAA4-000A9584EC8D</string>
<key>setting_name</key> //required by Sublime Text, i.e: settings; patterns
<dict>
Main Data, see [[tmPreferences.txt]] [[tmLanguage.txt]]
</dict>
</dict>
</plist>
To extract metadata information, you can use the view.meta_info(key, point) API call