view runtime/syntax/dot.vim @ 13431:19f9b74a424e v8.0.1590

patch 8.0.1590: padding in list type wastes memory commit https://github.com/vim/vim/commit/1a840240376f2858d489736f9eed6d2975225fdf Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 8 21:46:43 2018 +0100 patch 8.0.1590: padding in list type wastes memory Problem: Padding in list type wastes memory. Solution: Reorder struct members to optimize padding. (Dominique Pelle, closes #2704)
author Christian Brabandt <cb@256bit.org>
date Thu, 08 Mar 2018 22:00:05 +0100
parents 46763b01cd9a
children 4ab4ef0c48b1
line wrap: on
line source

" Vim syntax file
" Language:     Dot
" Filenames:    *.dot
" Maintainer:   Markus Mottl  <markus.mottl@gmail.com>
" URL:          http://www.ocaml.info/vim/syntax/dot.vim
" Last Change:  2011 May 17 - improved identifier matching + two new keywords
"               2001 May 04 - initial version

" quit when a syntax file was already loaded
if exists("b:current_syntax")
  finish
endif

" Errors
syn match    dotParErr     ")"
syn match    dotBrackErr   "]"
syn match    dotBraceErr   "}"

" Enclosing delimiters
syn region   dotEncl transparent matchgroup=dotParEncl start="(" matchgroup=dotParEncl end=")" contains=ALLBUT,dotParErr
syn region   dotEncl transparent matchgroup=dotBrackEncl start="\[" matchgroup=dotBrackEncl end="\]" contains=ALLBUT,dotBrackErr
syn region   dotEncl transparent matchgroup=dotBraceEncl start="{" matchgroup=dotBraceEncl end="}" contains=ALLBUT,dotBraceErr

" Comments
syn region   dotComment start="//" end="$" contains=dotComment,dotTodo
syn region   dotComment start="/\*" end="\*/" contains=dotComment,dotTodo
syn keyword  dotTodo contained TODO FIXME XXX

" Strings
syn region   dotString    start=+"+ skip=+\\\\\|\\"+ end=+"+

" General keywords
syn keyword  dotKeyword  digraph node edge subgraph

" Graph attributes
syn keyword  dotType center layers margin mclimit name nodesep nslimit
syn keyword  dotType ordering page pagedir rank rankdir ranksep ratio
syn keyword  dotType rotate size

" Node attributes
syn keyword  dotType distortion fillcolor fontcolor fontname fontsize
syn keyword  dotType height layer orientation peripheries regular
syn keyword  dotType shape shapefile sides skew width

" Edge attributes
syn keyword  dotType arrowhead arrowsize arrowtail constraint decorateP
syn keyword  dotType dir headclip headlabel headport labelangle labeldistance
syn keyword  dotType labelfontcolor labelfontname labelfontsize
syn keyword  dotType minlen port_label_distance samehead sametail
syn keyword  dotType tailclip taillabel tailport weight

" Shared attributes (graphs, nodes, edges)
syn keyword  dotType color

" Shared attributes (graphs and edges)
syn keyword  dotType bgcolor label URL

" Shared attributes (nodes and edges)
syn keyword  dotType fontcolor fontname fontsize layer style

" Special chars
syn match    dotKeyChar  "="
syn match    dotKeyChar  ";"
syn match    dotKeyChar  "->"

" Identifier
syn match    dotIdentifier /\<\w\+\(:\w\+\)\?\>/

" Synchronization
syn sync minlines=50
syn sync maxlines=500

" Define the default highlighting.
" Only when an item doesn't have highlighting yet

hi def link dotParErr	 Error
hi def link dotBraceErr	 Error
hi def link dotBrackErr	 Error

hi def link dotComment	 Comment
hi def link dotTodo	 Todo

hi def link dotParEncl	 Keyword
hi def link dotBrackEncl	 Keyword
hi def link dotBraceEncl	 Keyword

hi def link dotKeyword	 Keyword
hi def link dotType	 Type
hi def link dotKeyChar	 Keyword

hi def link dotString	 String
hi def link dotIdentifier	 Identifier


let b:current_syntax = "dot"

" vim: ts=8