File: stgedit.vim

package info (click to toggle)
stgit 0.19-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,748 kB
  • sloc: python: 10,558; sh: 5,739; lisp: 2,678; makefile: 142; perl: 42
file content (39 lines) | stat: -rw-r--r-- 1,234 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
" Vim syntax file
" Language:     StGit 'stg edit' commit message file
" Author:       Zane Bitter <zane.bitter@alliedtelesis.co.nz>

if exists("b:current_syntax")
  finish
endif


runtime! syntax/mail.vim
unlet b:current_syntax

syn include @stgDiff syntax/diff.vim


syn case match
syn sync minlines=50


if has("spell")
  syn spell toplevel
endif


syn match    stgeditFrom        "\%^From:.*" contains=mailHeader nextgroup=stgeditFirstLine skipempty
syn match    stgeditFirstLine   "^.\+" contained nextgroup=stgeditDiffs,stgeditComment,stgeditBlank skipnl
syn match    stgeditSummary     "^.\{0,50\}" contained containedin=stgeditFirstLine nextgroup=stgeditOverflow contains=@Spell
syn match    stgeditOverflow    ".*" contained contains=@Spell
syn match    stgeditBlank       "^.\+" contained contains=@Spell
syn match    stgeditComment     "^#.*"
syn region   stgeditDiffs       start="^---" end="%$" contains=@stgDiff fold
syn region   stgeditDiff        start="^\%(diff --git \)\@=" end="^\%(diff --git \|$\)\@=" contained containedin=stgeditDiffs contains=@stgDiff fold

hi def link  stgeditSummary     Keyword
hi def link  stgeditComment     Comment
hi def link  stgeditBlank       Error


let b:current_syntax = "stgedit"