Mercurial > vim
annotate runtime/syntax/srec.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | 12155a47f6c2 |
children | 46763b01cd9a |
rev | line source |
---|---|
6697 | 1 " Vim syntax file |
2 " Language: Motorola S-Record | |
3 " Maintainer: Markus Heidelberg <markus.heidelberg@web.de> | |
4 " Last Change: 2015 Feb 24 | |
5 | |
6 " Each record (line) is built as follows: | |
7 " | |
8 " field digits states | |
9 " | |
10 " +----------+ | |
11 " | start | 1 ('S') srecRecStart | |
12 " +----------+ | |
13 " | type | 1 srecRecType, (srecRecTypeUnknown) | |
14 " +----------+ | |
15 " | count | 2 srecByteCount | |
16 " +----------+ | |
17 " | address | 4/6/8 srecNoAddress, srecDataAddress, srecRecCount, srecStartAddress, (srecAddressFieldUnknown) | |
18 " +----------+ | |
19 " | data | 0..504/502/500 srecDataOdd, srecDataEven, (srecDataUnexpected) | |
20 " +----------+ | |
21 " | checksum | 2 srecChecksum | |
22 " +----------+ | |
23 " | |
24 " States in parentheses in the upper format description indicate that they | |
25 " should not appear in a valid file. | |
26 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
27 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
28 if exists("b:current_syntax") |
6697 | 29 finish |
30 endif | |
31 | |
32 syn match srecRecStart "^S" | |
33 | |
34 syn match srecRecTypeUnknown "^S." contains=srecRecStart | |
35 syn match srecRecType "^S[0-35-9]" contains=srecRecStart | |
36 | |
37 syn match srecByteCount "^S.[0-9a-fA-F]\{2}" contains=srecRecTypeUnknown nextgroup=srecAddressFieldUnknown,srecChecksum | |
38 syn match srecByteCount "^S[0-35-9][0-9a-fA-F]\{2}" contains=srecRecType | |
39 | |
40 syn match srecAddressFieldUnknown "[0-9a-fA-F]\{2}" contained nextgroup=srecAddressFieldUnknown,srecChecksum | |
41 | |
42 syn match srecNoAddress "^S0[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum | |
43 syn match srecDataAddress "^S1[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum | |
44 syn match srecDataAddress "^S2[0-9a-fA-F]\{8}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum | |
45 syn match srecDataAddress "^S3[0-9a-fA-F]\{10}" contains=srecByteCount nextgroup=srecDataOdd,srecChecksum | |
46 syn match srecRecCount "^S5[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum | |
47 syn match srecRecCount "^S6[0-9a-fA-F]\{8}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum | |
48 syn match srecStartAddress "^S7[0-9a-fA-F]\{10}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum | |
49 syn match srecStartAddress "^S8[0-9a-fA-F]\{8}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum | |
50 syn match srecStartAddress "^S9[0-9a-fA-F]\{6}" contains=srecByteCount nextgroup=srecDataUnexpected,srecChecksum | |
51 | |
52 " alternating highlight per byte for easier reading | |
53 syn match srecDataOdd "[0-9a-fA-F]\{2}" contained nextgroup=srecDataEven,srecChecksum | |
54 syn match srecDataEven "[0-9a-fA-F]\{2}" contained nextgroup=srecDataOdd,srecChecksum | |
55 " data bytes which should not exist | |
56 syn match srecDataUnexpected "[0-9a-fA-F]\{2}" contained nextgroup=srecDataUnexpected,srecChecksum | |
57 " Data digit pair regex usage also results in only highlighting the checksum | |
58 " if the number of data characters is even. | |
59 | |
60 syn match srecChecksum "[0-9a-fA-F]\{2}$" contained | |
61 | |
62 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
63 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
64 command -nargs=+ HiLink hi def link <args> |
6697 | 65 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
66 " The default methods for highlighting. Can be overridden later |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
67 HiLink srecRecStart srecRecType |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
68 HiLink srecRecTypeUnknown srecRecType |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
69 HiLink srecRecType WarningMsg |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
70 HiLink srecByteCount Constant |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
71 hi def srecAddressFieldUnknown term=italic cterm=italic gui=italic |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
72 HiLink srecNoAddress DiffAdd |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
73 HiLink srecDataAddress Comment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
74 HiLink srecRecCount srecNoAddress |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
75 HiLink srecStartAddress srecDataAddress |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
76 hi def srecDataOdd term=bold cterm=bold gui=bold |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
77 hi def srecDataEven term=NONE cterm=NONE gui=NONE |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
78 HiLink srecDataUnexpected Error |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
79 HiLink srecChecksum DiffChange |
6697 | 80 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
6697
diff
changeset
|
81 delcommand HiLink |
6697 | 82 |
83 let b:current_syntax = "srec" | |
84 | |
85 " vim: ts=8 |