Mercurial > hg > RemoteEditor > vim7
comparison runtime/syntax/edif.vim @ 0:76efa0be13f1
Initial revision
author | atsuki |
---|---|
date | Sat, 10 Nov 2007 15:07:22 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:76efa0be13f1 |
---|---|
1 " Vim syntax file | |
2 " Language: EDIF (Electronic Design Interchange Format) | |
3 " Maintainer: Artem Zankovich <z_artem@hotbox.ru> | |
4 " Last Change: Oct 14, 2002 | |
5 " | |
6 " Supported standarts are: | |
7 " ANSI/EIA Standard 548-1988 (EDIF Version 2 0 0) | |
8 " IEC 61690-1 (EDIF Version 3 0 0) | |
9 " IEC 61690-2 (EDIF Version 4 0 0) | |
10 | |
11 " Quit when a syntax file was already loaded | |
12 if version < 600 | |
13 syntax clear | |
14 elseif exists("b:current_syntax") | |
15 finish | |
16 endif | |
17 | |
18 if version >= 600 | |
19 setlocal iskeyword=48-57,-,+,A-Z,a-z,_,& | |
20 else | |
21 set iskeyword=A-Z,a-z,_,& | |
22 endif | |
23 | |
24 syn region edifList matchgroup=Delimiter start="(" end=")" contains=edifList,edifKeyword,edifString,edifNumber | |
25 | |
26 " Strings | |
27 syn match edifInStringError /%/ contained | |
28 syn match edifInString /%\s*\d\+\s*%/ contained | |
29 syn region edifString start=/"/ end=/"/ contains=edifInString,edifInStringError contained | |
30 | |
31 " Numbers | |
32 syn match edifNumber "\<[-+]\=[0-9]\+\>" | |
33 | |
34 " Keywords | |
35 syn match edifKeyword "(\@<=\s*[a-zA-Z&][a-zA-Z_0-9]*\>" contained | |
36 | |
37 syn match edifError ")" | |
38 | |
39 " synchronization | |
40 if version < 600 | |
41 syntax sync maxlines=250 | |
42 else | |
43 syntax sync fromstart | |
44 endif | |
45 | |
46 " Define the default highlighting. | |
47 if version >= 508 || !exists("did_edif_syntax_inits") | |
48 if version < 508 | |
49 let did_edif_syntax_inits = 1 | |
50 command -nargs=+ HiLink hi link <args> | |
51 else | |
52 command -nargs=+ HiLink hi def link <args> | |
53 endif | |
54 | |
55 HiLink edifInString SpecialChar | |
56 HiLink edifKeyword Keyword | |
57 HiLink edifNumber Number | |
58 HiLink edifInStringError edifError | |
59 HiLink edifError Error | |
60 HiLink edifString String | |
61 delcommand HiLink | |
62 endif | |
63 | |
64 let b:current_syntax = "edif" |