annotate runtime/syntax/edif.vim @ 6318:5e998fc610d5 v7.4.492

updated for version 7.4.492 Problem: In Insert mode, after inserting a newline that inserts a comment leader, CTRL-O moves to the right. (ZyX) Issue 57. Solution: Correct the condition for moving the cursor back to the NUL. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Fri, 31 Oct 2014 19:20:36 +0100
parents 3fc0f57ecb91
children 43efa4f5a8ea
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: EDIF (Electronic Design Interchange Format)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Artem Zankovich <z_artem@hotbox.ru>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: Oct 14, 2002
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Supported standarts are:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " ANSI/EIA Standard 548-1988 (EDIF Version 2 0 0)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " IEC 61690-1 (EDIF Version 3 0 0)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " IEC 61690-2 (EDIF Version 4 0 0)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 if version >= 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 setlocal iskeyword=48-57,-,+,A-Z,a-z,_,&
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 set iskeyword=A-Z,a-z,_,&
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn region edifList matchgroup=Delimiter start="(" end=")" contains=edifList,edifKeyword,edifString,edifNumber
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Strings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match edifInStringError /%/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match edifInString /%\s*\d\+\s*%/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn region edifString start=/"/ end=/"/ contains=edifInString,edifInStringError contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " Numbers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match edifNumber "\<[-+]\=[0-9]\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " Keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match edifKeyword "(\@<=\s*[a-zA-Z&][a-zA-Z_0-9]*\>" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match edifError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " synchronization
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syntax sync maxlines=250
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syntax sync fromstart
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 if version >= 508 || !exists("did_edif_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 let did_edif_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink edifInString SpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink edifKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HiLink edifNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink edifInStringError edifError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HiLink edifError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink edifString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 let b:current_syntax = "edif"