blob: cb9e8965de1a39a44eb9c31fe632259eb97a2d08 [file] [log] [blame]
Bram Moolenaar85eee132018-05-06 17:57:30 +02001" Vim syntax file
2" Language: Debian copyright file
3" Maintainer: Debian Vim Maintainers
josch4c454252024-07-28 17:05:06 +02004" Last Change: 2024 Jul 28
Bram Moolenaarbe4e0162023-02-02 13:59:48 +00005" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debcopyright.vim
Bram Moolenaar85eee132018-05-06 17:57:30 +02006
7" Standard syntax initialization
8if exists('b:current_syntax')
9 finish
10endif
11
12let s:cpo_save = &cpo
13set cpo&vim
14
15syn case match
16
17syn match debcopyrightUrl "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
josch4c454252024-07-28 17:05:06 +020018syn match debcopyrightKey "^\%(Format\|Upstream-Name\|Upstream-Contact\|Disclaimer\|Source\|Comment\|Files\|Copyright\|License\|Files-\%(Excluded\|Included\)\%(-[-a-zA-Z0-9]\+\)\=\): *"
Bram Moolenaar85eee132018-05-06 17:57:30 +020019syn match debcopyrightEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+"
20syn match debcopyrightEmail "<.\{-}>"
21syn match debcopyrightComment "^#.*$" contains=@Spell
22
23hi def link debcopyrightUrl Identifier
24hi def link debcopyrightKey Keyword
25hi def link debcopyrightEmail Identifier
26hi def link debcopyrightComment Comment
27
28let b:current_syntax = 'debcopyright'
29
30let &cpo = s:cpo_save
31unlet s:cpo_save
32
33" vim: ts=8 sw=2