Mercurial > vim
comparison runtime/syntax/xxd.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | b3bc99b909c3 |
children | 46763b01cd9a |
comparison
equal
deleted
inserted
replaced
10047:a62862410ca1 | 10048:43efa4f5a8ea |
---|---|
4 " Last Change: Oct 23, 2014 | 4 " Last Change: Oct 23, 2014 |
5 " Version: 8 | 5 " Version: 8 |
6 " Notes: use :help xxd to see how to invoke it | 6 " Notes: use :help xxd to see how to invoke it |
7 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XXD | 7 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XXD |
8 | 8 |
9 " For version 5.x: Clear all syntax items | 9 " quit when a syntax file was already loaded |
10 " For version 6.x: Quit when a syntax file was already loaded | 10 if exists("b:current_syntax") |
11 if version < 600 | |
12 syntax clear | |
13 elseif exists("b:current_syntax") | |
14 finish | 11 finish |
15 endif | 12 endif |
16 | 13 |
17 syn match xxdAddress "^[0-9a-f]\+:" contains=xxdSep | 14 syn match xxdAddress "^[0-9a-f]\+:" contains=xxdSep |
18 syn match xxdSep contained ":" | 15 syn match xxdSep contained ":" |
19 syn match xxdAscii " .\{,16\}\r\=$"hs=s+2 contains=xxdDot | 16 syn match xxdAscii " .\{,16\}\r\=$"hs=s+2 contains=xxdDot |
20 syn match xxdDot contained "[.\r]" | 17 syn match xxdDot contained "[.\r]" |
21 | 18 |
22 " Define the default highlighting. | 19 " Define the default highlighting. |
23 " For version 5.7 and earlier: only when not done already | 20 " Only when an item doesn't have highlighting yet |
24 " For version 5.8 and later: only when an item doesn't have highlighting yet | 21 command -nargs=+ HiLink hi def link <args> |
25 if version >= 508 || !exists("did_xxd_syntax_inits") | |
26 if version < 508 | |
27 let did_xxd_syntax_inits = 1 | |
28 command -nargs=+ HiLink hi link <args> | |
29 else | |
30 command -nargs=+ HiLink hi def link <args> | |
31 endif | |
32 | 22 |
33 HiLink xxdAddress Constant | 23 HiLink xxdAddress Constant |
34 HiLink xxdSep Identifier | 24 HiLink xxdSep Identifier |
35 HiLink xxdAscii Statement | 25 HiLink xxdAscii Statement |
36 | 26 |
37 delcommand HiLink | 27 delcommand HiLink |
38 endif | |
39 | 28 |
40 let b:current_syntax = "xxd" | 29 let b:current_syntax = "xxd" |
41 | 30 |
42 " vim: ts=4 | 31 " vim: ts=4 |