2 " Language: bin using xxd
4 " Maintainer: Dr. Charles E. Campbell, Jr. <Charles.E.Campbell.1@gsfc.nasa.gov>
5 " Last Change: March 19, 1999
6 " Notes: use :help xxd to see how to invoke it
8 " For version 5.x: Clear all syntax items
9 " For version 6.x: Quit when a syntax file was already loaded
12 elseif exists("b:current_syntax")
16 syn match xxdAddress "^[0-9a-f]\+:" contains=xxdSep
17 syn match xxdSep contained ":"
18 syn match xxdAscii " .\{,16\}\r\=$"hs=s+2 contains=xxdDot
19 syn match xxdDot contained "[.\r]"
21 " Define the default highlighting.
22 " For version 5.7 and earlier: only when not done already
23 " For version 5.8 and later: only when an item doesn't have highlighting yet
24 if version >= 508 || !exists("did_xxd_syntax_inits")
26 let did_xxd_syntax_inits = 1
27 command -nargs=+ HiLink hi link <args>
29 command -nargs=+ HiLink hi def link <args>
32 HiLink xxdAddress Constant
33 HiLink xxdSep Identifier
34 HiLink xxdAscii Statement
39 let b:current_syntax = "xxd"