Commits

ZyX_I committed a9f3f3d

Some :AuLog syntax fixes

  • Participants
  • Parent commits 8462955

Comments (0)

Files changed (1)

plugin/aurum/log.vim

                     call s:F.temp.addgroup(r, nlgroups,
                                 \'auLogPatchAdded,auLogPatchRemoved,'.
                                 \'auLogPatchFile,auLogPatchNewFile,'.
-                                \'auLogPatchOldFile')
+                                \'auLogPatchOldFile,auLogPatchOther,'.
+                                \'auLogPatchNotModified,'.
+                                \'auLogPatchChunkHeader')
                     let newr=[   'Added   /\V+\.\*/',
                                 \'Removed /\V-\.\*/',
                                 \'File    /\vdiff.*/',
-                                \'NewFile /\V+++ \.\*/']
+                                \'NewFile /\V+++ \.\*/',
+                                \'OldFile /\V--- \.\*/',
+                                \'NotModified  / \v.*/',
+                                \'ChunkHeader /@\v.*/',
+                                \'Other   /\v[^+\- @].*/',]
                     call map(newr, '"syn match auLogPatch".v:val.'.
-                                \  '" contained nextgroup=auLogNextLineStart"')
+                                \  '" contained skipnl '.
+                                \    'nextgroup=auLogNextLineStart"')
                     let r+=newr
-                    let r+=['syn match auLogPatchOldFile /\V--- \.\*/'.
-                                \' contained nextgroup=']
                 elseif kw is# 'stat'
                     call s:F.temp.addgroup(r, nlgroups,
                                 \'auLogStatFiles,auLogStatFileSep')
                                 \'FilesMsg / files changed, / '.
                                 \              'nextgroup=auLogStatIns',
                                 \'Ins /\v\d+/ nextgroup=auLogStatInsMsg',
-                                \'InsMsg / insertions / nextgroup=auLogStatDel',
-                                \'Del /\v\d+/ nextgroup=auLogNextLineStart',
+                                \'InsMsg / insertions, / '.
+                                \               'nextgroup=auLogStatDel',
+                                \'Del /\v\d+/ nextgroup=auLogStatDelMsg',
+                                \'DelMsg / deletions/ skipnl '.
+                                \           'nextgroup=auLogNextLineStart',
                                 \'FileSep /  / nextgroup=auLogStatFile',
                                 \'File /\v%(%(\ \|\ )@!.)+/ '.
                                 \             'nextgroup=auLogStatTSep',
                                 \'TSep /\v\s+\|\s+/ nextgroup=auLogStatTIns',
                                 \'TIns /\v\d+/ nextgroup=auLogStatTNumSep',
                                 \'TNumSep /\v\s+/ nextgroup=auLogStatTDel',
-                                \'TDel /\v\d+/ nextgroup=auLogNextLineStart']
+                                \'TDel /\v\d+/ skipnl '.
+                                \           'nextgroup=auLogNextLineStart']
                     call map(newr, '"syn match auLogStat".v:val.'.
                                 \  '" contained"')
                     let r+=newr
                 elseif kw is# 'hide'
-                    call s:F.temp.addgroup(r, nlgroups, 'auLog_hide'.i.'_'.j)
-                    let r+=['hi def link auLog_hide'.i.'_'.j.' Ignore']
-                    let r+=['syn match auLog_hide'.i.'_'.j.' '.
-                                \'/\V'.escape(arg[0], '\/').'/ contained '.
-                                \'nextgroup=']
+                    let sname='auLog_hide'.i.'_'.j
+                    call s:F.temp.addgroup(r, nlgroups, sname)
+                    let r+=['hi def link '.sname.' Ignore']
+                    let r+=['syn match '.sname.' /\V'.escape(arg[0], '\/').'/ '.
+                                \'contained nextgroup=']
                 elseif lmeta==j+1 && llit<=j+1
                     call s:F.temp.addgroup(r, nlgroups, 'auLog_'.kw)
                     let r+=['syn match auLog_'.kw.' /\v.*/ '.
     endfor
     if !empty(nlgroups)
         let r+=['syn match auLogNextLineStart @\v'.s:schs.'+@ skipwhite '.
-                    \'contained nextgroup='.join(nlgroups, ',')]
+                    \' nextgroup='.join(nlgroups, ',')]
     endif
     let s:syncache[cid]=r
     return r