annotate runtime/syntax/registry.vim @ 23453:b0ea0dd2298a

Added tag v8.2.2269 for changeset 8fa9d31cd248b9f2983a496ade9f1247708e0c91
author Bram Moolenaar <Bram@vim.org>
date Fri, 01 Jan 2021 21:45:04 +0100
parents 46763b01cd9a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Windows Registry export with regedit (*.reg)
6336
4abac79c0b7a Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
3 " Maintainer: Dominique Stéphan (dominique@mggen.com)
4abac79c0b7a Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
4 " URL: http://www.mggen.com/vim/syntax/registry.zip (doesn't work)
4abac79c0b7a Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
5 " Last change: 2014 Oct 31
4abac79c0b7a Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
6 " Included patch from Alexander A. Ulitin
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " clear any unwanted syntax defs
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6336
diff changeset
9 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 6336
diff changeset
10 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " shut case off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " Head of regedit .reg files, it's REGEDIT4 on Win9#/NT
6336
4abac79c0b7a Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
18 syn match registryHead "^REGEDIT[0-9]*\s*$\|^Windows Registry Editor Version \d*\.\d*\s*$"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match registryComment "^;.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Registry Key constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword registryHKEY HKEY_LOCAL_MACHINE HKEY_CLASSES_ROOT HKEY_CURRENT_USER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword registryHKEY HKEY_USERS HKEY_CURRENT_CONFIG HKEY_DYN_DATA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Registry Key shortcuts
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword registryHKEY HKLM HKCR HKCU HKU HKCC HKDD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Some values often found in the registry
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " GUID (Global Unique IDentifier)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match registryGUID "{[0-9A-Fa-f]\{8}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{12}}" contains=registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Disk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " syn match registryDisk "[a-zA-Z]:\\\\"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Special and Separator characters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match registrySpecial "\\"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match registrySpecial "\\\\"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match registrySpecial "\\\""
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match registrySpecial "\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match registrySpecial ","
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match registrySpecial "\/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match registrySpecial ":"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match registrySpecial "-"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match registryString "\".*\"" contains=registryGUID,registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " Path
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn region registryPath start="\[" end="\]" contains=registryHKEY,registryGUID,registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " Path to remove
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " like preceding path but with a "-" at begin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn region registryRemove start="\[\-" end="\]" contains=registryHKEY,registryGUID,registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " Subkey
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn match registrySubKey "^\".*\"="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " Default value
6336
4abac79c0b7a Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
59 syn match registrySubKey "^@="
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " Numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " Hex or Binary
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 " The format can be precised between () :
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " 0 REG_NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " 1 REG_SZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " 2 REG_EXPAND_SZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " 3 REG_BINARY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 " 4 REG_DWORD, REG_DWORD_LITTLE_ENDIAN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " 5 REG_DWORD_BIG_ENDIAN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 " 6 REG_LINK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " 7 REG_MULTI_SZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " 8 REG_RESOURCE_LIST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 " 9 REG_FULL_RESOURCE_DESCRIPTOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 " 10 REG_RESOURCE_REQUIREMENTS_LIST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " The value can take several lines, if \ ends the line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 " The limit to 999 matches is arbitrary, it avoids Vim crashing on a very long
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 " line of hex values that ends in a comma.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 "syn match registryHex "hex\(([0-9]\{0,2})\)\=:\([0-9a-fA-F]\{2},\)\{0,999}\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match registryHex "hex\(([0-9]\{0,2})\)\=:\([0-9a-fA-F]\{2},\)*\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match registryHex "^\s*\([0-9a-fA-F]\{2},\)\{0,999}\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 " Dword (32 bits)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn match registryDword "dword:[0-9a-fA-F]\{8}$" contains=registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 " The default methods for highlighting. Can be overridden later
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
87 hi def link registryComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
88 hi def link registryHead Constant
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
89 hi def link registryHKEY Constant
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
90 hi def link registryPath Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
91 hi def link registryRemove PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
92 hi def link registryGUID Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
93 hi def link registrySpecial Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
94 hi def link registrySubKey Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
95 hi def link registryString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
96 hi def link registryHex Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
97 hi def link registryDword Number
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 let b:current_syntax = "registry"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 " vim:ts=8