vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

jjdescription.vim (1057B)


      1 " Vim syntax file
      2 " Language:	jj description
      3 " Maintainer:	Gregory Anders <greg@gpanders.com>
      4 " Last Change:	2024 May 8
      5 " 2025 Apr 17 by Vim Project (don't require space to start comments, #17130)
      6 " 2026 Apr 09 by Vim Project (anchor status regex to beginning of line, #19879)
      7 " 2026 Apr 09 by Vim Project (detect renames of files, #19879)
      8 
      9 if exists('b:current_syntax')
     10   finish
     11 endif
     12 
     13 syn match jjAdded "^JJ:\s\+\zsA\s.*" contained
     14 syn match jjRemoved "^JJ:\s\+\zsD\s.*" contained
     15 syn match jjChanged "^JJ:\s\+\zsM\s.*" contained
     16 syn match jjRenamed "^JJ:\s\+\zsR\s.*" contained
     17 
     18 syn region jjComment start="^JJ:" end="$" contains=jjAdded,jjRemoved,jjChanged,jjRenamed
     19 
     20 syn include @jjCommitDiff syntax/diff.vim
     21 syn region jjCommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@jjCommitDiff
     22 
     23 hi def link jjComment Comment
     24 hi def link jjAdded Added
     25 hi def link jjRemoved Removed
     26 hi def link jjChanged Changed
     27 hi def link jjRenamed Changed
     28 
     29 let b:current_syntax = 'jjdescription'