annotate runtime/syntax/dot.vim @ 5899:60cdaa05a6ad v7.4.292

updated for version 7.4.292 Problem: Searching for "a" does not match accented "a" with new regexp engine, does match with old engine. (David B?rgin) "ca" does not match "ca" with accented "a" with either engine. Solution: Change the old engine, check for following composing character also for single-byte patterns.
author Bram Moolenaar <bram@vim.org>
date Tue, 13 May 2014 18:04:00 +0200
parents c869ff170ddc
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: Dot
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Filenames: *.dot
659
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
4 " Maintainer: Markus Mottl <markus.mottl@gmail.com>
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
5 " URL: http://www.ocaml.info/vim/syntax/dot.vim
2833
c869ff170ddc Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 659
diff changeset
6 " Last Change: 2011 May 17 - improved identifier matching + two new keywords
20
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 7
diff changeset
7 " 2001 May 04 - initial version
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " Errors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match dotParErr ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match dotBrackErr "]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match dotBraceErr "}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Enclosing delimiters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn region dotEncl transparent matchgroup=dotParEncl start="(" matchgroup=dotParEncl end=")" contains=ALLBUT,dotParErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn region dotEncl transparent matchgroup=dotBrackEncl start="\[" matchgroup=dotBrackEncl end="\]" contains=ALLBUT,dotBrackErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn region dotEncl transparent matchgroup=dotBraceEncl start="{" matchgroup=dotBraceEncl end="}" contains=ALLBUT,dotBraceErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn region dotComment start="//" end="$" contains=dotComment,dotTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn region dotComment start="/\*" end="\*/" contains=dotComment,dotTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword dotTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " Strings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn region dotString start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " General keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword dotKeyword digraph node edge subgraph
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Graph attributes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword dotType center layers margin mclimit name nodesep nslimit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword dotType ordering page pagedir rank rankdir ranksep ratio
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword dotType rotate size
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " Node attributes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword dotType distortion fillcolor fontcolor fontname fontsize
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword dotType height layer orientation peripheries regular
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword dotType shape shapefile sides skew width
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 " Edge attributes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword dotType arrowhead arrowsize arrowtail constraint decorateP
2833
c869ff170ddc Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 659
diff changeset
50 syn keyword dotType dir headclip headlabel headport labelangle labeldistance
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword dotType labelfontcolor labelfontname labelfontsize
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword dotType minlen port_label_distance samehead sametail
2833
c869ff170ddc Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 659
diff changeset
53 syn keyword dotType tailclip taillabel tailport weight
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " Shared attributes (graphs, nodes, edges)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword dotType color
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 " Shared attributes (graphs and edges)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword dotType bgcolor label URL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " Shared attributes (nodes and edges)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword dotType fontcolor fontname fontsize layer style
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 " Special chars
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match dotKeyChar "="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match dotKeyChar ";"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn match dotKeyChar "->"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 " Identifier
2833
c869ff170ddc Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 659
diff changeset
70 syn match dotIdentifier /\<\w\+\(:\w\+\)\?\>/
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " Synchronization
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn sync minlines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn sync maxlines=500
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 if version >= 508 || !exists("did_dot_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 let did_dot_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink dotParErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink dotBraceErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink dotBrackErr Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink dotComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink dotTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 HiLink dotParEncl Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 HiLink dotBrackEncl Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink dotBraceEncl Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 HiLink dotKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 HiLink dotType Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 HiLink dotKeyChar Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 HiLink dotString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 HiLink dotIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 let b:current_syntax = "dot"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 " vim: ts=8