diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:09:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:09:20 +0000 |
commit | 029f72b1a93430b24b88eb3a72c6114d9f149737 (patch) | |
tree | 765d5c2041967f9c6fef195fe343d9234a030e90 /runtime/syntax/debcopyright.vim | |
parent | Initial commit. (diff) | |
download | vim-029f72b1a93430b24b88eb3a72c6114d9f149737.tar.xz vim-029f72b1a93430b24b88eb3a72c6114d9f149737.zip |
Adding upstream version 2:9.1.0016.upstream/2%9.1.0016
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/syntax/debcopyright.vim')
-rw-r--r-- | runtime/syntax/debcopyright.vim | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/runtime/syntax/debcopyright.vim b/runtime/syntax/debcopyright.vim new file mode 100644 index 0000000..6f76b5c --- /dev/null +++ b/runtime/syntax/debcopyright.vim @@ -0,0 +1,33 @@ +" Vim syntax file +" Language: Debian copyright file +" Maintainer: Debian Vim Maintainers +" Last Change: 2023 Jan 16 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debcopyright.vim + +" Standard syntax initialization +if exists('b:current_syntax') + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn case match + +syn match debcopyrightUrl "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$" +syn match debcopyrightKey "^\%(Format\|Upstream-Name\|Upstream-Contact\|Disclaimer\|Source\|Comment\|Files\|Copyright\|License\|Files-Excluded\%(-[-a-zA-Z0-9]\+\)\=\): *" +syn match debcopyrightEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+" +syn match debcopyrightEmail "<.\{-}>" +syn match debcopyrightComment "^#.*$" contains=@Spell + +hi def link debcopyrightUrl Identifier +hi def link debcopyrightKey Keyword +hi def link debcopyrightEmail Identifier +hi def link debcopyrightComment Comment + +let b:current_syntax = 'debcopyright' + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 sw=2 |