| 
									
										
										
										
											2006-03-28 21:08:56 +00:00
										 |  |  | " Vim syntax file | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | " Language:     Debian sources.list | 
					
						
							| 
									
										
										
										
											2018-02-09 22:00:53 +01:00
										 |  |  | " Maintainer:   Debian Vim Maintainers | 
					
						
							| 
									
										
										
										
											2008-07-13 17:41:49 +00:00
										 |  |  | " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> | 
					
						
							| 
									
										
										
										
											2023-02-20 20:44:55 +00:00
										 |  |  | " Last Change: 2023 Feb 06 | 
					
						
							| 
									
										
										
										
											2023-02-02 13:59:48 +00:00
										 |  |  | " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim | 
					
						
							| 
									
										
										
										
											2006-03-28 21:08:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | " Standard syntax initialization | 
					
						
							| 
									
										
										
										
											2018-05-06 17:57:30 +02:00
										 |  |  | if exists('b:current_syntax') | 
					
						
							| 
									
										
										
										
											2006-03-28 21:08:56 +00:00
										 |  |  |   finish | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " case sensitive | 
					
						
							|  |  |  | syn case match | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | " A bunch of useful keywords | 
					
						
							| 
									
										
										
										
											2023-02-20 20:44:55 +00:00
										 |  |  | syn match debsourcesType               /\(deb-src\|deb\)/ | 
					
						
							|  |  |  | syn match debsourcesFreeComponent      /\(main\|universe\)/ | 
					
						
							|  |  |  | syn match debsourcesNonFreeComponent   /\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/ | 
					
						
							| 
									
										
										
										
											2006-03-28 21:08:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | " Match comments | 
					
						
							| 
									
										
										
										
											2010-01-06 20:54:52 +01:00
										 |  |  | syn match debsourcesComment        /#.*/  contains=@Spell | 
					
						
							| 
									
										
										
										
											2006-03-28 21:08:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-09 19:44:55 +02:00
										 |  |  | let s:cpo = &cpo | 
					
						
							|  |  |  | set cpo-=C | 
					
						
							|  |  |  | let s:supported = [ | 
					
						
							| 
									
										
										
										
											2022-07-29 21:36:21 +01:00
										 |  |  |       \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy', | 
					
						
							| 
									
										
										
										
											2022-11-09 21:21:04 +00:00
										 |  |  |       \ 'buster', 'bullseye', 'bookworm', 'trixie', 'forky', | 
					
						
							| 
									
										
										
										
											2015-06-09 19:44:55 +02:00
										 |  |  |       \ | 
					
						
							| 
									
										
										
										
											2022-11-09 21:21:04 +00:00
										 |  |  |       \ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic', 'lunar', | 
					
						
							| 
									
										
										
										
											2021-10-23 12:08:41 +01:00
										 |  |  |       \ 'devel' | 
					
						
							| 
									
										
										
										
											2015-06-09 19:44:55 +02:00
										 |  |  |       \ ] | 
					
						
							|  |  |  | let s:unsupported = [ | 
					
						
							|  |  |  |       \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', | 
					
						
							| 
									
										
										
										
											2020-11-05 20:41:49 +01:00
										 |  |  |       \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy', | 
					
						
							| 
									
										
										
										
											2022-07-29 21:36:21 +01:00
										 |  |  |       \ 'jessie', 'stretch', | 
					
						
							| 
									
										
										
										
											2015-06-09 19:44:55 +02:00
										 |  |  |       \ | 
					
						
							|  |  |  |       \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', | 
					
						
							|  |  |  |       \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', | 
					
						
							| 
									
										
										
										
											2017-06-13 18:12:01 +02:00
										 |  |  |       \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', | 
					
						
							| 
									
										
										
										
											2020-02-04 22:53:05 +01:00
										 |  |  |       \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic', | 
					
						
							| 
									
										
										
										
											2022-07-29 21:36:21 +01:00
										 |  |  |       \ 'disco', 'eoan', 'hirsute', 'impish', 'groovy' | 
					
						
							| 
									
										
										
										
											2015-06-09 19:44:55 +02:00
										 |  |  |       \ ] | 
					
						
							|  |  |  | let &cpo=s:cpo | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-03-28 21:08:56 +00:00
										 |  |  | " Match uri's | 
					
						
							| 
									
										
										
										
											2018-05-06 17:57:30 +02:00
										 |  |  | syn match debsourcesUri            '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' 	<>"]\+' | 
					
						
							| 
									
										
										
										
											2017-06-13 18:12:01 +02:00
										 |  |  | exe 'syn match debsourcesDistrKeyword   +\([[:alnum:]_./]*\)\<\('. join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+' | 
					
						
							|  |  |  | exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+' | 
					
						
							| 
									
										
										
										
											2006-03-28 21:08:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | " Associate our matches and regions with pretty colours | 
					
						
							| 
									
										
										
										
											2015-06-09 19:44:55 +02:00
										 |  |  | hi def link debsourcesLine                    Error | 
					
						
							| 
									
										
										
										
											2023-02-20 20:44:55 +00:00
										 |  |  | hi def link debsourcesType                    Statement | 
					
						
							|  |  |  | hi def link debsourcesFreeComponent           Statement | 
					
						
							|  |  |  | hi def link debsourcesNonFreeComponent        Statement | 
					
						
							| 
									
										
										
										
											2015-06-09 19:44:55 +02:00
										 |  |  | hi def link debsourcesDistrKeyword            Type | 
					
						
							|  |  |  | hi def link debsourcesUnsupportedDistrKeyword WarningMsg | 
					
						
							|  |  |  | hi def link debsourcesComment                 Comment | 
					
						
							|  |  |  | hi def link debsourcesUri                     Constant | 
					
						
							| 
									
										
										
										
											2006-03-28 21:08:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-05-06 17:57:30 +02:00
										 |  |  | let b:current_syntax = 'debsources' |