annotate runtime/syntax/registry.vim @ 5328:c47c8cd5fe5c v7.4.017

updated for version 7.4.017 Problem: ":help !!" does not find the "!!" tag in the help file. (Ben Fritz) Solution: When reading the start of the tags file do parse lines that are not header lines.
author Bram Moolenaar <bram@vim.org>
date Thu, 05 Sep 2013 12:06:33 +0200
parents 3fc0f57ecb91
children 4abac79c0b7a
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)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Dominique Stéphan (dominique@mggen.com)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://www.mggen.com/vim/syntax/registry.zip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last change: 2004 Apr 23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " clear any unwanted syntax defs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " shut case off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " Head of regedit .reg files, it's REGEDIT4 on Win9#/NT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match registryHead "^REGEDIT[0-9]*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match registryComment "^;.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Registry Key constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword registryHKEY HKEY_LOCAL_MACHINE HKEY_CLASSES_ROOT HKEY_CURRENT_USER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword registryHKEY HKEY_USERS HKEY_CURRENT_CONFIG HKEY_DYN_DATA
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " Registry Key shortcuts
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword registryHKEY HKLM HKCR HKCU HKU HKCC HKDD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " Some values often found in the registry
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " GUID (Global Unique IDentifier)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 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
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Disk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " syn match registryDisk "[a-zA-Z]:\\\\"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Special and Separator characters
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 syn match registrySpecial ":"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match registrySpecial "-"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match registryString "\".*\"" contains=registryGUID,registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " Path
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn region registryPath start="\[" end="\]" contains=registryHKEY,registryGUID,registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Path to remove
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " like preceding path but with a "-" at begin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn region registryRemove start="\[\-" end="\]" contains=registryHKEY,registryGUID,registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " Subkey
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match registrySubKey "^\".*\"="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " Default value
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match registrySubKey "^\@="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " Numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " Hex or Binary
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " The format can be precised between () :
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " 0 REG_NONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " 1 REG_SZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 " 2 REG_EXPAND_SZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " 3 REG_BINARY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 " 4 REG_DWORD, REG_DWORD_LITTLE_ENDIAN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " 5 REG_DWORD_BIG_ENDIAN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " 6 REG_LINK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 " 7 REG_MULTI_SZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 " 8 REG_RESOURCE_LIST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " 9 REG_FULL_RESOURCE_DESCRIPTOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 " 10 REG_RESOURCE_REQUIREMENTS_LIST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 " The value can take several lines, if \ ends the line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " 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
80 " line of hex values that ends in a comma.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 "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
82 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
83 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
84 " Dword (32 bits)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match registryDword "dword:[0-9a-fA-F]\{8}$" contains=registrySpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 if version >= 508 || !exists("did_registry_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 let did_registry_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 " The default methods for highlighting. Can be overridden later
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink registryComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 HiLink registryHead Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 HiLink registryHKEY Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 HiLink registryPath Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 HiLink registryRemove PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 HiLink registryGUID Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 HiLink registrySpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 HiLink registrySubKey Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 HiLink registryString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 HiLink registryHex Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 HiLink registryDword Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 let b:current_syntax = "registry"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 " vim:ts=8