| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  | " Vim syntax file | 
					
						
							| 
									
										
										
										
											2019-01-01 15:32:17 +01:00
										 |  |  | " Language: tpp - Text Presentation Program | 
					
						
							|  |  |  | " Maintainer: Debian Vim Maintainers | 
					
						
							|  |  |  | " Former Maintainer: Gerfried Fuchs <alfie@ist.org> | 
					
						
							| 
									
										
										
										
											2023-02-02 13:59:48 +00:00
										 |  |  | " Last Change: 2023 Jan 16 | 
					
						
							|  |  |  | " URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/tpp.vim | 
					
						
							| 
									
										
										
										
											2019-01-01 15:32:17 +01:00
										 |  |  | " Filenames: *.tpp | 
					
						
							|  |  |  | " License: BSD | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  | " | 
					
						
							| 
									
										
										
										
											2006-04-17 22:14:47 +00:00
										 |  |  | " XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain | 
					
						
							|  |  |  | "     it only because patches have been submitted for it by Debian users and the | 
					
						
							|  |  |  | "     former maintainer was MIA (Missing In Action), taking over its | 
					
						
							|  |  |  | "     maintenance was thus the only way to include those patches. | 
					
						
							|  |  |  | "     If you care about this file, and have time to maintain it please do so! | 
					
						
							|  |  |  | " | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  | " Comments are very welcome - but please make sure that you are commenting on | 
					
						
							|  |  |  | " the latest version of this file. | 
					
						
							|  |  |  | " SPAM is _NOT_ welcome - be ready to be reported! | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | " quit when a syntax file was already loaded | 
					
						
							| 
									
										
										
										
											2019-01-01 15:32:17 +01:00
										 |  |  | if exists('b:current_syntax') | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  |   finish | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-01 15:32:17 +01:00
										 |  |  | if !exists('main_syntax') | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  |   let main_syntax = 'tpp' | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | "" list of the legal switches/options | 
					
						
							| 
									
										
										
										
											2006-04-17 22:14:47 +00:00
										 |  |  | syn match tppAbstractOptionKey contained "^--\%(author\|title\|date\|footer\) *" nextgroup=tppString | 
					
						
							|  |  |  | syn match tppPageLocalOptionKey contained "^--\%(heading\|center\|right\|huge\|sethugefont\|exec\) *" nextgroup=tppString | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  | syn match tppPageLocalSwitchKey contained "^--\%(horline\|-\|\%(begin\|end\)\%(\%(shell\)\?output\|slide\%(left\|right\|top\|bottom\)\)\|\%(bold\|rev\|ul\)\%(on\|off\)\|withborder\)" | 
					
						
							| 
									
										
										
										
											2006-04-17 22:14:47 +00:00
										 |  |  | syn match tppNewPageOptionKey contained "^--newpage *" nextgroup=tppString | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  | syn match tppColorOptionKey contained "^--\%(\%(bg\|fg\)\?color\) *" | 
					
						
							|  |  |  | syn match tppTimeOptionKey contained "^--sleep *" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2006-04-17 22:14:47 +00:00
										 |  |  | syn match tppString contained ".*" | 
					
						
							|  |  |  | syn match tppColor contained "\%(white\|yellow\|red\|green\|blue\|cyan\|magenta\|black\|default\)" | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  | syn match tppTime contained "\d\+" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | syn region tppPageLocalSwitch start="^--" end="$" contains=tppPageLocalSwitchKey oneline | 
					
						
							|  |  |  | syn region tppColorOption start="^--\%(\%(bg\|fg\)\?color\)" end="$" contains=tppColorOptionKey,tppColor oneline | 
					
						
							|  |  |  | syn region tppTimeOption start="^--sleep" end="$" contains=tppTimeOptionKey,tppTime oneline | 
					
						
							|  |  |  | syn region tppNewPageOption start="^--newpage" end="$" contains=tppNewPageOptionKey oneline | 
					
						
							| 
									
										
										
										
											2004-12-09 21:34:53 +00:00
										 |  |  | syn region tppPageLocalOption start="^--\%(heading\|center\|right\|huge\|sethugefont\|exec\)" end="$" contains=tppPageLocalOptionKey oneline | 
					
						
							| 
									
										
										
										
											2006-04-17 22:14:47 +00:00
										 |  |  | syn region tppAbstractOption start="^--\%(author\|title\|date\|footer\)" end="$" contains=tppAbstractOptionKey oneline | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-01 15:32:17 +01:00
										 |  |  | if main_syntax !=# 'sh' | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  |   " shell command | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  |   syn include @tppShExec syntax/sh.vim | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  |   unlet b:current_syntax | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   syn region shExec matchgroup=tppPageLocalOptionKey start='^--exec *' keepend end='$' contains=@tppShExec | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2004-12-09 21:34:53 +00:00
										 |  |  | syn match tppComment "^--##.*$" | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | " Define the default highlighting. | 
					
						
							| 
									
										
										
										
											2016-08-30 23:26:57 +02:00
										 |  |  | " Only when an item doesn't have highlighting yet | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-31 22:22:10 +02:00
										 |  |  | hi def link tppAbstractOptionKey		Special | 
					
						
							|  |  |  | hi def link tppPageLocalOptionKey		Keyword | 
					
						
							|  |  |  | hi def link tppPageLocalSwitchKey		Keyword | 
					
						
							|  |  |  | hi def link tppColorOptionKey		Keyword | 
					
						
							|  |  |  | hi def link tppTimeOptionKey		Comment | 
					
						
							|  |  |  | hi def link tppNewPageOptionKey		PreProc | 
					
						
							|  |  |  | hi def link tppString			String | 
					
						
							|  |  |  | hi def link tppColor			String | 
					
						
							|  |  |  | hi def link tppTime			Number | 
					
						
							|  |  |  | hi def link tppComment			Comment | 
					
						
							|  |  |  | hi def link tppAbstractOption		Error | 
					
						
							|  |  |  | hi def link tppPageLocalOption		Error | 
					
						
							|  |  |  | hi def link tppPageLocalSwitch		Error | 
					
						
							|  |  |  | hi def link tppColorOption			Error | 
					
						
							|  |  |  | hi def link tppNewPageOption		Error | 
					
						
							|  |  |  | hi def link tppTimeOption			Error | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-01 15:32:17 +01:00
										 |  |  | let b:current_syntax = 'tpp' | 
					
						
							| 
									
										
										
										
											2004-10-24 19:18:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | " vim: ts=8 sw=2 |