diff options
Diffstat (limited to 'runtime/syntax/hex.vim')
-rw-r--r-- | runtime/syntax/hex.vim | 51 |
1 files changed, 20 insertions, 31 deletions
diff --git a/runtime/syntax/hex.vim b/runtime/syntax/hex.vim index 40f7f0dd1..d2637eaae 100644 --- a/runtime/syntax/hex.vim +++ b/runtime/syntax/hex.vim @@ -25,11 +25,8 @@ " States in parentheses in the upper format description indicate that they " should not appear in a valid file. -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -68,34 +65,26 @@ syn match hexChecksum "[0-9a-fA-F]\{2}$" contained syn region hexExtAdrBlock start="^:[0-9a-fA-F]\{7}[24]" skip="^:[0-9a-fA-F]\{7}0" end="^:"me=s-1 fold transparent " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_hex_syntax_inits") - if version < 508 - let did_hex_syntax_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> - " The default methods for highlighting. Can be overridden later - HiLink hexRecStart hexRecType - HiLink hexDataByteCount Constant - hi def hexAddressFieldUnknown term=italic cterm=italic gui=italic - HiLink hexDataAddress Comment - HiLink hexNoAddress DiffAdd - HiLink hexRecTypeUnknown hexRecType - HiLink hexRecType WarningMsg - hi def hexDataFieldUnknown term=italic cterm=italic gui=italic - hi def hexDataOdd term=bold cterm=bold gui=bold - hi def hexDataEven term=NONE cterm=NONE gui=NONE - HiLink hexDataUnexpected Error - HiLink hexExtendedAddress hexDataAddress - HiLink hexStartAddress hexDataAddress - HiLink hexChecksum DiffChange +" The default methods for highlighting. Can be overridden later +HiLink hexRecStart hexRecType +HiLink hexDataByteCount Constant +hi def hexAddressFieldUnknown term=italic cterm=italic gui=italic +HiLink hexDataAddress Comment +HiLink hexNoAddress DiffAdd +HiLink hexRecTypeUnknown hexRecType +HiLink hexRecType WarningMsg +hi def hexDataFieldUnknown term=italic cterm=italic gui=italic +hi def hexDataOdd term=bold cterm=bold gui=bold +hi def hexDataEven term=NONE cterm=NONE gui=NONE +HiLink hexDataUnexpected Error +HiLink hexExtendedAddress hexDataAddress +HiLink hexStartAddress hexDataAddress +HiLink hexChecksum DiffChange - delcommand HiLink -endif +delcommand HiLink let b:current_syntax = "hex" |