annotate runtime/syntax/dot.vim @ 32168:6bdf843c3023 v9.0.1415

patch 9.0.1415: Crystal files are not recognized Commit: https://github.com/vim/vim/commit/7c4516fe93d865f4ef1877181f8156b8b9331856 Author: Amaan Qureshi <amaanq12@gmail.com> Date: Sun Mar 19 20:43:26 2023 +0000 patch 9.0.1415: Crystal files are not recognized Problem: Crystal files are not recognized. Solution: Add a pattern for Crystal files. (Amaan Qureshi, closes https://github.com/vim/vim/issues/12175)
author Bram Moolenaar <Bram@vim.org>
date Sun, 19 Mar 2023 21:45:05 +0100
parents 4ab4ef0c48b1
children
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 " Language: Dot
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Filenames: *.dot
659
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
3 " Maintainer: Markus Mottl <markus.mottl@gmail.com>
d6a69271cb9a updated for version 7.0194
vimboss
parents: 20
diff changeset
4 " URL: http://www.ocaml.info/vim/syntax/dot.vim
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
5 " Last Change: 2021 Mar 24 - better attr + escape string matching, new keywords (Farbod Salamat-Zadeh)
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
6 " 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
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
9 " For version 5.x: Clear all syntax items
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
10 " For version 6.x: Quit when a syntax file was already loaded
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
11 if version < 600
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
12 syntax clear
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
13 elseif exists("b:current_syntax")
7
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
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
17 let s:keepcpo = &cpo
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
18 set cpo&vim
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
19
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Errors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match dotParErr ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match dotBrackErr "]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match dotBraceErr "}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Enclosing delimiters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn region dotEncl transparent matchgroup=dotParEncl start="(" matchgroup=dotParEncl end=")" contains=ALLBUT,dotParErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn region dotEncl transparent matchgroup=dotBrackEncl start="\[" matchgroup=dotBrackEncl end="\]" contains=ALLBUT,dotBrackErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn region dotEncl transparent matchgroup=dotBraceEncl start="{" matchgroup=dotBraceEncl end="}" contains=ALLBUT,dotBraceErr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn region dotComment start="//" end="$" contains=dotComment,dotTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn region dotComment start="/\*" end="\*/" contains=dotComment,dotTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword dotTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Strings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region dotString start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
38 " Escape strings
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
39 syn match dotEscString /\v\\(N|G|E|T|H|L)/ containedin=dotString
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
40 syn match dotEscString /\v\\(n|l|r)/ containedin=dotString
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
42 " General keywords
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
43 syn keyword dotKeyword graph digraph subgraph node edge strict
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
45 " Node, edge and graph attributes
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
46 syn keyword dotType _background area arrowhead arrowsize arrowtail bb bgcolor
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
47 \ center charset class clusterrank color colorscheme comment compound
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
48 \ concentrate constraint Damping decorate defaultdist dim dimen dir
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
49 \ diredgeconstraints distortion dpi edgehref edgetarget edgetooltip
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
50 \ edgeURL epsilon esep fillcolor fixedsize fontcolor fontname fontnames
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
51 \ fontpath fontsize forcelabels gradientangle group head_lp headclip
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
52 \ headhref headlabel headport headtarget headtooltip headURL height href
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
53 \ id image imagepath imagepos imagescale inputscale K label label_scheme
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
54 \ labelangle labeldistance labelfloat labelfontcolor labelfontname
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
55 \ labelfontsize labelhref labeljust labelloc labeltarget labeltooltip
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
56 \ labelURL landscape layer layerlistsep layers layerselect layersep
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
57 \ layout len levels levelsgap lhead lheight lp ltail lwidth margin
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
58 \ maxiter mclimit mindist minlen mode model mosek newrank nodesep
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
59 \ nojustify normalize notranslate nslimit nslimit1 ordering orientation
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
60 \ outputorder overlap overlap_scaling overlap_shrink pack packmode pad
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
61 \ page pagedir pencolor penwidth peripheries pin pos quadtree quantum
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
62 \ rank rankdir ranksep ratio rects regular remincross repulsiveforce
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
63 \ resolution root rotate rotation samehead sametail samplepoints scale
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
64 \ searchsize sep shape shapefile showboxes sides size skew smoothing
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
65 \ sortv splines start style stylesheet tail_lp tailclip tailhref
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
66 \ taillabel tailport tailtarget tailtooltip tailURL target tooltip
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
67 \ truecolor URL vertices viewport voro_margin weight width xdotversion
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
68 \ xlabel xlp z
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " Special chars
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match dotKeyChar "="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn match dotKeyChar ";"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match dotKeyChar "->"
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
74 syn match dotKeyChar "--"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Identifier
2833
c869ff170ddc Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 659
diff changeset
77 syn match dotIdentifier /\<\w\+\(:\w\+\)\?\>/
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " Synchronization
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn sync minlines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn sync maxlines=500
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 " Define the default highlighting.
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
84 " For version 5.7 and earlier: only when not done already
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
85 " For version 5.8 and later: only when an item doesn't have highlighting yet
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
86 if version >= 508 || !exists("did_dot_syntax_inits")
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
87 if version < 508
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
88 let did_dot_syntax_inits = 1
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
89 command -nargs=+ HiLink hi link <args>
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
90 else
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
91 command -nargs=+ HiLink hi def link <args>
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
92 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
94 HiLink dotParErr Error
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
95 HiLink dotBraceErr Error
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
96 HiLink dotBrackErr Error
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
98 HiLink dotComment Comment
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
99 HiLink dotTodo Todo
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
100
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
101 HiLink dotParEncl Keyword
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
102 HiLink dotBrackEncl Keyword
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
103 HiLink dotBraceEncl Keyword
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
105 HiLink dotKeyword Keyword
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
106 HiLink dotType Type
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
107 HiLink dotKeyChar Keyword
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
109 HiLink dotString String
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
110 HiLink dotEscString Keyword
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
111 HiLink dotIdentifier Identifier
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
113 delcommand HiLink
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
114 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 let b:current_syntax = "dot"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
24278
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
118 let &cpo = s:keepcpo
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
119 unlet s:keepcpo
4ab4ef0c48b1 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 10051
diff changeset
120
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 " vim: ts=8