aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/debchangelog.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-07-11 04:05:51 +0000
committerJustin M. Keyes <justinkz@gmail.com>2014-07-29 02:12:31 +0000
commita98a6996c291b3e300d27b791eded9eed333d677 (patch)
tree51d92f6cac128f938cd0aaa9a8dd0ce7a83d63a9 /runtime/syntax/debchangelog.vim
parent66bc13163398786c88e20b7cdd61c66978b4d3fb (diff)
downloadrneovim-a98a6996c291b3e300d27b791eded9eed333d677.tar.gz
rneovim-a98a6996c291b3e300d27b791eded9eed333d677.tar.bz2
rneovim-a98a6996c291b3e300d27b791eded9eed333d677.zip
re-integrate runtime/ vim-patch:0 #938
Vim runtime files based on 7.4.384 / hg changeset 7090d7f160f7 Excluding: Amiga icons (*.info, icons/) doc/hangulin.txt tutor/ spell/ lang/ (only used for menu translations) macros/maze/, macros/hanoi/, macros/life/, macros/urm/ These were used to test vi compatibility. termcap "Demonstration of a termcap file (for the Amiga and Archimedes)" Helped-by: Rich Wareham <rjw57@cam.ac.uk> Helped-by: John <john.schmidt.h@gmail.com> Helped-by: Yann <yann@yann-salaun.com> Helped-by: Christophe Badoit <c.badoit@lesiteimmo.com> Helped-by: drasill <github@tof2k.com> Helped-by: Tae Sandoval Murgan <taecilla@gmail.com> Helped-by: Lowe Thiderman <lowe.thiderman@gmail.com>
Diffstat (limited to 'runtime/syntax/debchangelog.vim')
-rw-r--r--runtime/syntax/debchangelog.vim59
1 files changed, 59 insertions, 0 deletions
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
new file mode 100644
index 0000000000..6206fa388c
--- /dev/null
+++ b/runtime/syntax/debchangelog.vim
@@ -0,0 +1,59 @@
+" Vim syntax file
+" Language: Debian changelog files
+" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
+" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
+" Wichert Akkerman <wakkerma@debian.org>
+" Last Change: 2014 Jul 11
+" URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/debchangelog.vim
+
+" Standard syntax initialization
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" Case doesn't matter for us
+syn case ignore
+
+" Define some common expressions we can use later on
+syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
+syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\|emergency\)\( \S.*\)\="
+syn match debchangelogTarget contained "\v %(frozen|unstable|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile)|wheezy-backports|%(devel|lucid|precise|trusty|utopic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
+syn match debchangelogVersion contained "(.\{-})"
+syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
+syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
+syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+"
+syn match debchangelogEmail contained "<.\{-}>"
+
+" Define the entries that make up the changelog
+syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogUrgency,debchangelogTarget,debchangelogVersion oneline
+syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline
+syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses,debchangelogLP oneline
+
+" Associate our matches and regions with pretty colours
+if version >= 508 || !exists("did_debchangelog_syn_inits")
+ if version < 508
+ let did_debchangelog_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ HiLink debchangelogHeader Error
+ HiLink debchangelogFooter Identifier
+ HiLink debchangelogEntry Normal
+ HiLink debchangelogCloses Statement
+ HiLink debchangelogLP Statement
+ HiLink debchangelogUrgency Identifier
+ HiLink debchangelogName Comment
+ HiLink debchangelogVersion Identifier
+ HiLink debchangelogTarget Identifier
+ HiLink debchangelogEmail Special
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "debchangelog"
+
+" vim: ts=8 sw=2