1" Vim syntax file 2" Language: Intel hex MCS51 3" Maintainer: Sams Ricahrd <[email protected]> 4" Last Change: 2003 Apr 25 5 6" For version 5.x: Clear all syntax items 7" For version 6.x: Quit when a syntax file was already loaded 8if version < 600 9 syntax clear 10elseif exists("b:current_syntax") 11 finish 12endif 13 14syn case ignore 15 16" storage types 17 18syn match hexChecksum "[0-9a-fA-F]\{2}$" 19syn match hexAdress "^:[0-9a-fA-F]\{6}" contains=hexDataByteCount 20syn match hexRecType "^:[0-9a-fA-F]\{8}" contains=hexAdress 21syn match hexDataByteCount contained "^:[0-9a-fA-F]\{2}" contains=hexStart 22syn match hexStart contained "^:" 23syn match hexExtAdrRec "^:02000002[0-9a-fA-F]\{4}" contains=hexSpecRec 24syn match hexExtLinAdrRec "^:02000004[0-9a-fA-F]\{4}" contains=hexSpecRec 25syn match hexSpecRec contained "^:0[02]00000[124]" contains=hexStart 26syn match hexEOF "^:00000001" contains=hexStart 27 28syn case match 29 30" Define the default highlighting. 31" For version 5.7 and earlier: only when not done already 32" For version 5.8 and later: only when an item doesn't have highlighting yet 33if version >= 508 || !exists("did_hex_syntax_inits") 34 if version < 508 35 let did_hex_syntax_inits = 1 36 command -nargs=+ HiLink hi link <args> 37 else 38 command -nargs=+ HiLink hi def link <args> 39 endif 40 41 " The default methods for highlighting. Can be overridden later 42 HiLink hexStart SpecialKey 43 HiLink hexDataByteCount Constant 44 HiLink hexAdress Comment 45 HiLink hexRecType WarningMsg 46 HiLink hexChecksum Search 47 HiLink hexExtAdrRec hexAdress 48 HiLink hexEOF hexSpecRec 49 HiLink hexExtLinAdrRec hexAdress 50 HiLink hexSpecRec DiffAdd 51 52 delcommand HiLink 53endif 54 55let b:current_syntax = "hex" 56 57" vim: ts=8 58