1009b2592SBram Moolenaar" Vim syntax file 2009b2592SBram Moolenaar" Language: tpp - Text Presentation Program 3*4c05fa08SBram Moolenaar" Maintainer: Debian Vim Maintainers 4a93fa7eeSBram Moolenaar" Former Maintainer: Gerfried Fuchs <[email protected]> 5*4c05fa08SBram Moolenaar" Last Change: 2018 Dec 27 6*4c05fa08SBram Moolenaar" URL: https://salsa.debian.org/vim-team/vim-debian/master/syntax/tpp.vim 7009b2592SBram Moolenaar" Filenames: *.tpp 8009b2592SBram Moolenaar" License: BSD 9009b2592SBram Moolenaar" 10a93fa7eeSBram Moolenaar" XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain 11a93fa7eeSBram Moolenaar" it only because patches have been submitted for it by Debian users and the 12a93fa7eeSBram Moolenaar" former maintainer was MIA (Missing In Action), taking over its 13a93fa7eeSBram Moolenaar" maintenance was thus the only way to include those patches. 14a93fa7eeSBram Moolenaar" If you care about this file, and have time to maintain it please do so! 15a93fa7eeSBram Moolenaar" 16009b2592SBram Moolenaar" Comments are very welcome - but please make sure that you are commenting on 17009b2592SBram Moolenaar" the latest version of this file. 18009b2592SBram Moolenaar" SPAM is _NOT_ welcome - be ready to be reported! 19009b2592SBram Moolenaar 2089bcfda6SBram Moolenaar" quit when a syntax file was already loaded 21*4c05fa08SBram Moolenaarif exists('b:current_syntax') 22009b2592SBram Moolenaar finish 23009b2592SBram Moolenaarendif 24009b2592SBram Moolenaar 25*4c05fa08SBram Moolenaarif !exists('main_syntax') 26009b2592SBram Moolenaar let main_syntax = 'tpp' 27009b2592SBram Moolenaarendif 28009b2592SBram Moolenaar 29009b2592SBram Moolenaar 30009b2592SBram Moolenaar"" list of the legal switches/options 31a93fa7eeSBram Moolenaarsyn match tppAbstractOptionKey contained "^--\%(author\|title\|date\|footer\) *" nextgroup=tppString 32a93fa7eeSBram Moolenaarsyn match tppPageLocalOptionKey contained "^--\%(heading\|center\|right\|huge\|sethugefont\|exec\) *" nextgroup=tppString 33009b2592SBram Moolenaarsyn match tppPageLocalSwitchKey contained "^--\%(horline\|-\|\%(begin\|end\)\%(\%(shell\)\?output\|slide\%(left\|right\|top\|bottom\)\)\|\%(bold\|rev\|ul\)\%(on\|off\)\|withborder\)" 34a93fa7eeSBram Moolenaarsyn match tppNewPageOptionKey contained "^--newpage *" nextgroup=tppString 35009b2592SBram Moolenaarsyn match tppColorOptionKey contained "^--\%(\%(bg\|fg\)\?color\) *" 36009b2592SBram Moolenaarsyn match tppTimeOptionKey contained "^--sleep *" 37009b2592SBram Moolenaar 38a93fa7eeSBram Moolenaarsyn match tppString contained ".*" 39a93fa7eeSBram Moolenaarsyn match tppColor contained "\%(white\|yellow\|red\|green\|blue\|cyan\|magenta\|black\|default\)" 40009b2592SBram Moolenaarsyn match tppTime contained "\d\+" 41009b2592SBram Moolenaar 42009b2592SBram Moolenaarsyn region tppPageLocalSwitch start="^--" end="$" contains=tppPageLocalSwitchKey oneline 43009b2592SBram Moolenaarsyn region tppColorOption start="^--\%(\%(bg\|fg\)\?color\)" end="$" contains=tppColorOptionKey,tppColor oneline 44009b2592SBram Moolenaarsyn region tppTimeOption start="^--sleep" end="$" contains=tppTimeOptionKey,tppTime oneline 45009b2592SBram Moolenaarsyn region tppNewPageOption start="^--newpage" end="$" contains=tppNewPageOptionKey oneline 46293ee4d4SBram Moolenaarsyn region tppPageLocalOption start="^--\%(heading\|center\|right\|huge\|sethugefont\|exec\)" end="$" contains=tppPageLocalOptionKey oneline 47a93fa7eeSBram Moolenaarsyn region tppAbstractOption start="^--\%(author\|title\|date\|footer\)" end="$" contains=tppAbstractOptionKey oneline 48009b2592SBram Moolenaar 49*4c05fa08SBram Moolenaarif main_syntax !=# 'sh' 50009b2592SBram Moolenaar " shell command 51009b2592SBram Moolenaar syn include @tppShExec syntax/sh.vim 52009b2592SBram Moolenaar unlet b:current_syntax 53009b2592SBram Moolenaar 54009b2592SBram Moolenaar syn region shExec matchgroup=tppPageLocalOptionKey start='^--exec *' keepend end='$' contains=@tppShExec 55009b2592SBram Moolenaar 56009b2592SBram Moolenaarendif 57009b2592SBram Moolenaar 58293ee4d4SBram Moolenaarsyn match tppComment "^--##.*$" 59009b2592SBram Moolenaar 60009b2592SBram Moolenaar" Define the default highlighting. 6189bcfda6SBram Moolenaar" Only when an item doesn't have highlighting yet 62009b2592SBram Moolenaar 63f37506f6SBram Moolenaarhi def link tppAbstractOptionKey Special 64f37506f6SBram Moolenaarhi def link tppPageLocalOptionKey Keyword 65f37506f6SBram Moolenaarhi def link tppPageLocalSwitchKey Keyword 66f37506f6SBram Moolenaarhi def link tppColorOptionKey Keyword 67f37506f6SBram Moolenaarhi def link tppTimeOptionKey Comment 68f37506f6SBram Moolenaarhi def link tppNewPageOptionKey PreProc 69f37506f6SBram Moolenaarhi def link tppString String 70f37506f6SBram Moolenaarhi def link tppColor String 71f37506f6SBram Moolenaarhi def link tppTime Number 72f37506f6SBram Moolenaarhi def link tppComment Comment 73f37506f6SBram Moolenaarhi def link tppAbstractOption Error 74f37506f6SBram Moolenaarhi def link tppPageLocalOption Error 75f37506f6SBram Moolenaarhi def link tppPageLocalSwitch Error 76f37506f6SBram Moolenaarhi def link tppColorOption Error 77f37506f6SBram Moolenaarhi def link tppNewPageOption Error 78f37506f6SBram Moolenaarhi def link tppTimeOption Error 79009b2592SBram Moolenaar 80009b2592SBram Moolenaar 81*4c05fa08SBram Moolenaarlet b:current_syntax = 'tpp' 82009b2592SBram Moolenaar 83009b2592SBram Moolenaar" vim: ts=8 sw=2 84