codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: Lout3" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>4" Last Change: So 12 Feb 2012 15:15:03 CET5" Filenames: *.lout,*.lt6" URL: http://www.cvjb.de/comp/vim/lout.vim7 8" $Id: lout.vim,v 1.4 2012/02/12 15:16:17 bruessow Exp $9"10" Lout: Basser Lout document formatting system.11 12" Many Thanks to...13" 14" 2012-02-12:15" Thilo Six <T.Six at gmx dot de> send a patch for cpoptions.16" See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/3215117 18 19" quit when a syntax file was already loaded20if exists("b:current_syntax")21 finish22endif23 24let s:cpo_save=&cpo25set cpo&vim26 27" Lout is case sensitive28syn case match29 30" Synchronization, I know it is a huge number, but normal texts can be31" _very_ long ;-)32syn sync lines=100033 34" Characters allowed in keywords35" I don't know if 128-255 are allowed in ANS-FORHT36setlocal iskeyword=@,48-57,.,@-@,_,192-25537 38" Some special keywords39syn keyword loutTodo contained TODO lout Lout LOUT40syn keyword loutDefine def macro41 42" Some big structures43syn keyword loutKeyword @Begin @End @Figure @Tab44syn keyword loutKeyword @Book @Doc @Document @Report45syn keyword loutKeyword @Introduction @Abstract @Appendix46syn keyword loutKeyword @Chapter @Section @BeginSections @EndSections47 48" All kind of Lout keywords49syn match loutFunction '\<@[^ \t{}]\+\>'50 51" Braces -- Don`t edit these lines!52syn match loutMBraces '[{}]'53syn match loutIBraces '[{}]'54syn match loutBBrace '[{}]'55syn match loutBIBraces '[{}]'56syn match loutHeads '[{}]'57 58" Unmatched braces.59syn match loutBraceError '}'60 61" End of multi-line definitions, like @Document, @Report and @Book.62syn match loutEOmlDef '^//$'63 64" Grouping of parameters and objects.65syn region loutObject transparent matchgroup=Delimiter start='{' matchgroup=Delimiter end='}' contains=ALLBUT,loutBraceError66 67" The NULL object has a special meaning68syn keyword loutNULL {}69 70" Comments71syn region loutComment start='\#' end='$' contains=loutTodo72 73" Double quotes74syn region loutSpecial start=+"+ skip=+\\\\\|\\"+ end=+"+75 76" ISO-LATIN-1 characters created with @Char, or Adobe symbols77" created with @Sym78syn match loutSymbols '@\(\(Char\)\|\(Sym\)\)\s\+[A-Za-z]\+'79 80" Include files81syn match loutInclude '@IncludeGraphic\s\+\k\+'82syn region loutInclude start='@\(\(SysInclude\)\|\(IncludeGraphic\)\|\(Include\)\)\s*{' end='}'83 84" Tags85syn match loutTag '@\(\(Tag\)\|\(PageMark\)\|\(PageOf\)\|\(NumberOf\)\)\s\+\k\+'86syn region loutTag start='@Tag\s*{' end='}'87 88" Equations89syn match loutMath '@Eq\s\+\k\+'90syn region loutMath matchgroup=loutMBraces start='@Eq\s*{' matchgroup=loutMBraces end='}' contains=ALLBUT,loutBraceError91"92" Fonts93syn match loutItalic '@I\s\+\k\+'94syn region loutItalic matchgroup=loutIBraces start='@I\s*{' matchgroup=loutIBraces end='}' contains=ALLBUT,loutBraceError95syn match loutBold '@B\s\+\k\+'96syn region loutBold matchgroup=loutBBraces start='@B\s*{' matchgroup=loutBBraces end='}' contains=ALLBUT,loutBraceError97syn match loutBoldItalic '@BI\s\+\k\+'98syn region loutBoldItalic matchgroup=loutBIBraces start='@BI\s*{' matchgroup=loutBIBraces end='}' contains=ALLBUT,loutBraceError99syn region loutHeadings matchgroup=loutHeads start='@\(\(Title\)\|\(Caption\)\)\s*{' matchgroup=loutHeads end='}' contains=ALLBUT,loutBraceError100 101" Define the default highlighting.102" Only when an item doesn't have highlighting yet103 104" The default methods for highlighting. Can be overrriden later.105hi def link loutTodo Todo106hi def link loutDefine Define107hi def link loutEOmlDef Define108hi def link loutFunction Function109hi def link loutBraceError Error110hi def link loutNULL Special111hi def link loutComment Comment112hi def link loutSpecial Special113hi def link loutSymbols Character114hi def link loutInclude Include115hi def link loutKeyword Keyword116hi def link loutTag Tag117hi def link loutMath Number118 119hi def link loutMBraces loutMath120hi loutItalic term=italic cterm=italic gui=italic121hi def link loutIBraces loutItalic122hi loutBold term=bold cterm=bold gui=bold123hi def link loutBBraces loutBold124hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic125hi def link loutBIBraces loutBoldItalic126hi loutHeadings term=bold cterm=bold guifg=indianred127hi def link loutHeads loutHeadings128 129 130let b:current_syntax = "lout"131 132let &cpo=s:cpo_save133unlet s:cpo_save134 135" vim:ts=8:sw=4:nocindent:smartindent:136 