Bug#869965: vim: please add syntax highlighting for debian/copyright files

James McCoy jamessan at debian.org
Sun Aug 13 15:38:08 UTC 2017

On Fri, Jul 28, 2017 at 09:10:57AM +0100, Chris Lamb wrote:
> A patch is attached that adds simple syntax highlighting for
> DEP-5 debian/copyright files.


> diff --git a/runtime/syntax/debcopyright.vim b/runtime/syntax/debcopyright.vim
> new file mode 100644
> index 0000000..dd34be4
> --- /dev/null
> +++ b/runtime/syntax/debcopyright.vim
> @@ -0,0 +1,32 @@
> +" Vim syntax file
> +" Language:    Debian copyright file
> +" Maintainer:  Chris Lamb <lamby at debian.org>

Do you want to maintain this under the umbrella of pkg-vim-maintainers?
I'd be glad to add you to the team. :)

If not, I'd prefer having you send this upstream since Bram will only
accept updates from the Maintainer.

> +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\): *"

What do you think about handling single-line vs. multi-line fields, like
in debcontrol.vim?

GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB

More information about the pkg-vim-maintainers mailing list