Commits

ZyX_I committed 26c9f3e

@%aurum/log/templates, syntax/aurumlog: Improved parents_ and children_ highlighting

  • Participants
  • Parent commits 52b46bd

Comments (0)

Files changed (2)

File autoload/aurum/log/templates.vim

                     call s:F.addgroup(r, nlgroups, 'auLog_'.kw)
                     let r+=['syn match auLog_'.kw.' /'.arg.synreg.'/ '.
                                 \'contained nextgroup=']
-                elseif kw is# 'hex'
+                elseif kw is# 'hex' || kw is# 'parents_' || kw is# 'children_'
                     if has_key(a:repo, 'hexreg')
-                        call s:F.addgroup(r, nlgroups, 'auLog_hex')
-                        let r+=['syn match auLog_hex /'.a:repo.hexreg.'/ '.
+                        call s:F.addgroup(r, nlgroups, 'auLog_'.kw)
+                        let r+=['syn match auLog_'.kw.' /'.a:repo.hexreg.'/ '.
                                     \'contained nextgroup=']
                     else
-                        call s:F.addgroup(r, nlgroups, 'auLogHexStart')
-                        let r+=['syn match auLogHexStart /\v\x{12}/ contained'.
-                                    \' nextgroup=auLogHexEnd',
-                                \'syn match auLogHexEnd /\v\x+/ contained '.
-                                \   (has('conceal')?('conceal'):('')).
+                        call s:F.addgroup(r, nlgroups, 'auLogHexStart_'.kw)
+                        let r+=['syn match auLogHexStart_'.kw.' /\v\x{12}/'.
+                                    \' contained nextgroup=auLogHexEnd_'.kw,
+                                \'syn match auLogHexEnd_'.kw.' '.
+                                \   '/\v\x+/ contained'.
+                                \   (has('conceal')?(' conceal'):('')).
                                 \   ' nextgroup=']
                     endif
                 elseif kw is# 'patch'

File syntax/aurumlog.vim

 
 hi def link auLogSkipBefore_hex    Comment
 hi def link auLog_rev_suf          Comment
-hi def link auLogHexEnd            Comment
 
 hi def link auLogPatchFile         diffFile
 hi def link auLogPatchNewFile      diffNewFile
     hi auLogHexStart       ctermfg=DarkYellow  guifg=DarkYellow
 endif
 hi def link auLog_hex auLogHexStart
+hi def link auLogHexStart_hex auLogHexStart
+hi def link auLogHexEnd_hex   auLogHexStart
+
+hi def link auLogHexEnd_parents_  auLogHexStart_parents_
+hi def link auLogHexEnd_children_ auLogHexStart_children_
 
 let b:current_syntax=expand('<sfile>:t:r')
 if exists('s:_pluginloaded')