neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

hgcommit.vim (1413B)


      1 " Vim syntax file
      2 " Language:	hg/sl (Mercurial / Sapling) commit file
      3 " Maintainer:	Ken Takata <kentkt at csc dot jp>
      4 "  		Max Coplan <mchcopl@gmail.com>
      5 " Last Change:	2022-12-08
      6 " License:	VIM License
      7 " URL:		https://github.com/k-takata/hg-vim
      8 
      9 if exists("b:current_syntax")
     10  finish
     11 endif
     12 
     13 syn match hgcommitComment "^\%(SL\|HG\): .*$"            contains=@NoSpell
     14 syn match hgcommitUser    "^\%(SL\|HG\): user: \zs.*$"   contains=@NoSpell contained containedin=hgcommitComment
     15 syn match hgcommitBranch  "^\%(SL\|HG\): branch \zs.*$"  contains=@NoSpell contained containedin=hgcommitComment
     16 syn match hgcommitAdded   "^\%(SL\|HG\): \zsadded .*$"   contains=@NoSpell contained containedin=hgcommitComment
     17 syn match hgcommitChanged "^\%(SL\|HG\): \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
     18 syn match hgcommitRemoved "^\%(SL\|HG\): \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
     19 
     20 syn region hgcommitDiff start=/\%(^\(SL\|HG\): diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@hgcommitDiff
     21 syn include @hgcommitDiff syntax/shared/hgcommitDiff.vim
     22 
     23 hi def link hgcommitComment Comment
     24 hi def link hgcommitUser    String
     25 hi def link hgcommitBranch  String
     26 hi def link hgcommitAdded   Identifier
     27 hi def link hgcommitChanged Special
     28 hi def link hgcommitRemoved Constant
     29 
     30 let b:current_syntax = "hgcommit"