Add support for :winpos
[MacVim.git] / runtime / syntax / dot.vim
blob507f72e2810f4d4e3b85a91b87bf53a195e0c889
1 " Vim syntax file
2 " Language:     Dot
3 " Filenames:    *.dot
4 " Maintainer:   Markus Mottl  <markus.mottl@gmail.com>
5 " URL:          http://www.ocaml.info/vim/syntax/dot.vim
6 " Last Change:  2006 Feb 05
7 "               2001 May 04 - initial version
9 " For version 5.x: Clear all syntax items
10 " For version 6.x: Quit when a syntax file was already loaded
11 if version < 600
12   syntax clear
13 elseif exists("b:current_syntax")
14   finish
15 endif
17 " Errors
18 syn match    dotParErr     ")"
19 syn match    dotBrackErr   "]"
20 syn match    dotBraceErr   "}"
22 " Enclosing delimiters
23 syn region   dotEncl transparent matchgroup=dotParEncl start="(" matchgroup=dotParEncl end=")" contains=ALLBUT,dotParErr
24 syn region   dotEncl transparent matchgroup=dotBrackEncl start="\[" matchgroup=dotBrackEncl end="\]" contains=ALLBUT,dotBrackErr
25 syn region   dotEncl transparent matchgroup=dotBraceEncl start="{" matchgroup=dotBraceEncl end="}" contains=ALLBUT,dotBraceErr
27 " Comments
28 syn region   dotComment start="//" end="$" contains=dotComment,dotTodo
29 syn region   dotComment start="/\*" end="\*/" contains=dotComment,dotTodo
30 syn keyword  dotTodo contained TODO FIXME XXX
32 " Strings
33 syn region   dotString    start=+"+ skip=+\\\\\|\\"+ end=+"+
35 " General keywords
36 syn keyword  dotKeyword  digraph node edge subgraph
38 " Graph attributes
39 syn keyword  dotType center layers margin mclimit name nodesep nslimit
40 syn keyword  dotType ordering page pagedir rank rankdir ranksep ratio
41 syn keyword  dotType rotate size
43 " Node attributes
44 syn keyword  dotType distortion fillcolor fontcolor fontname fontsize
45 syn keyword  dotType height layer orientation peripheries regular
46 syn keyword  dotType shape shapefile sides skew width
48 " Edge attributes
49 syn keyword  dotType arrowhead arrowsize arrowtail constraint decorateP
50 syn keyword  dotType dir headclip headlabel labelangle labeldistance
51 syn keyword  dotType labelfontcolor labelfontname labelfontsize
52 syn keyword  dotType minlen port_label_distance samehead sametail
53 syn keyword  dotType tailclip taillabel weight
55 " Shared attributes (graphs, nodes, edges)
56 syn keyword  dotType color
58 " Shared attributes (graphs and edges)
59 syn keyword  dotType bgcolor label URL
61 " Shared attributes (nodes and edges)
62 syn keyword  dotType fontcolor fontname fontsize layer style
64 " Special chars
65 syn match    dotKeyChar  "="
66 syn match    dotKeyChar  ";"
67 syn match    dotKeyChar  "->"
69 " Identifier
70 syn match    dotIdentifier /\<\w\+\>/
72 " Synchronization
73 syn sync minlines=50
74 syn sync maxlines=500
76 " Define the default highlighting.
77 " For version 5.7 and earlier: only when not done already
78 " For version 5.8 and later: only when an item doesn't have highlighting yet
79 if version >= 508 || !exists("did_dot_syntax_inits")
80   if version < 508
81     let did_dot_syntax_inits = 1
82     command -nargs=+ HiLink hi link <args>
83   else
84     command -nargs=+ HiLink hi def link <args>
85   endif
87   HiLink dotParErr       Error
88   HiLink dotBraceErr     Error
89   HiLink dotBrackErr     Error
91   HiLink dotComment      Comment
92   HiLink dotTodo         Todo
94   HiLink dotParEncl      Keyword
95   HiLink dotBrackEncl    Keyword
96   HiLink dotBraceEncl    Keyword
98   HiLink dotKeyword      Keyword
99   HiLink dotType         Type
100   HiLink dotKeyChar      Keyword
102   HiLink dotString       String
103   HiLink dotIdentifier   Identifier
105   delcommand HiLink
106 endif
108 let b:current_syntax = "dot"
110 " vim: ts=8