vim script for a debian sources.list
Matthijs Mohlmann
matthijs at cacholong.nl
Mon Mar 27 21:10:49 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I've written a script that highlights the sources.list in Debian. I
would like it if it could be included into the vim 7 release. The files
only exists in two places:
/etc/apt/sources.list and
/etc/apt/sources.list.d/*
The script is attached on this mail.
Thanks for considering to include this script.
Regards,
Matthijs Mohlmann
Debian VIM Maintainers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEKFTZ2n1ROIkXqbARAvj+AJ9Kep4sXUx4BHESCAJwp3evFyhogwCeJdmF
AmFrbG2U9CVBhohTH5fyZvw=
=s/0x
-----END PGP SIGNATURE-----
-------------- next part --------------
" Vim syntax file
" Language: Debian sources.list
" Maintainer: Matthijs Mohlmann <matthijs at cacholong.nl>
" Last Change: $Date: 2005/08/13 11:51:26 $
" URL: http://www.cacholong.nl/~matthijs/vim/syntax/debsources.vim
" $Revision: 1.4 $
" this is a very simple syntax file - I will be improving it
" add entire DEFINE syntax
" Standard syntax initialization
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" case sensitive
syn case match
" deb-src is a keyword
setlocal iskeyword+=-
" A bunch of useful keywords
syn keyword sourcesKeyword deb deb-src
syn keyword sourcesKeyword main contrib non-free
" Match comments
syn match sourcesComment /#.*/
" Match uri's
syn match sourcesUri +\(http://\|ftp://\|file:///\)[^' <>"]\++
syn match sourcesDistrKeyword +\([[:alnum:]_./]*\)\(woody\|sarge\|etch\|old-stable\|stable\|testing\|unstable\|sid\|experimental\|warty\|hoary\|breezy\)\([[:alnum:]_./]*\)+
" Associate our matches and regions with pretty colours
if version >= 508 || !exists("did_debsources_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 sourcesLine Error
HiLink sourcesKeyword Statement
HiLink sourcesDistrKeyword Type
HiLink sourcesComment Comment
HiLink sourcesUri Constant
delcommand HiLink
endif
let b:current_syntax = "debsources"
" vim: ts=8
More information about the pkg-vim-maintainers
mailing list