blob: 1c06b4296f19f566480bc7dee712f818c573b4fd [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: bin using xxd
Christian Brabandtf9ca1392024-02-19 20:37:11 +01003" Maintainer: This runtime file is looking for a new maintainer.
4" Former Maintainer: Charles E. Campbell
Bram Moolenaarf37506f2016-08-31 22:22:10 +02005" Last Change: Aug 31, 2016
Bram Moolenaar1d9215b2020-01-25 13:27:42 +01006" Version: 11
Christian Brabandtf9ca1392024-02-19 20:37:11 +01007" 2024 Feb 19 by Vim Project (announce adoption)
Bram Moolenaar071d4272004-06-13 20:20:40 +00008" Notes: use :help xxd to see how to invoke it
Christian Brabandtf9ca1392024-02-19 20:37:11 +01009" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XXD
Bram Moolenaar071d4272004-06-13 20:20:40 +000010
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020011" quit when a syntax file was already loaded
12if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000013 finish
14endif
15
16syn match xxdAddress "^[0-9a-f]\+:" contains=xxdSep
17syn match xxdSep contained ":"
18syn match xxdAscii " .\{,16\}\r\=$"hs=s+2 contains=xxdDot
19syn match xxdDot contained "[.\r]"
20
21" Define the default highlighting.
Bram Moolenaarf37506f2016-08-31 22:22:10 +020022if !exists("skip_xxd_syntax_inits")
Bram Moolenaar071d4272004-06-13 20:20:40 +000023
Bram Moolenaarf37506f2016-08-31 22:22:10 +020024 hi def link xxdAddress Constant
25 hi def link xxdSep Identifier
26 hi def link xxdAscii Statement
Bram Moolenaar071d4272004-06-13 20:20:40 +000027
Bram Moolenaarf37506f2016-08-31 22:22:10 +020028endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000029
30let b:current_syntax = "xxd"
31
32" vim: ts=4