Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
wml.vim151 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:     WML - Website MetaLanguage3" Maintainer:   Gerfried Fuchs <alfie@ist.org>4" Filenames:    *.wml5" Last Change:  07 Feb 20026" URL:		http://alfie.ist.org/software/vim/syntax/wml.vim7"8" Original Version: Craig Small <csmall@eye-net.com.au>9 10" Comments are very welcome - but please make sure that you are commenting on11" the latest version of this file.12" SPAM is _NOT_ welcome - be ready to be reported!13 14"  If you are looking for the "Wireless Markup Language" syntax file,15"  please take a look at the wap.vim file done by Ralf Schandl, soon in a16"  vim-package around your corner :)17 18 19" quit when a syntax file was already loaded20if exists("b:current_syntax")21  finish22endif23 24 25" A lot of the web stuff looks like HTML so we load that first26runtime! syntax/html.vim27unlet b:current_syntax28 29if !exists("main_syntax")30  let main_syntax = 'wml'31endif32 33" special character34syn match wmlNextLine	"\\$"35 36" Redfine htmlTag37syn clear htmlTag38syn region  htmlTag  start=+<[^/<]+ end=+>+  contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition39 40"41" Add in extra Arguments used by wml42syn keyword htmlTagName contained gfont imgbg imgdot lowsrc43syn keyword htmlTagName contained navbar:define navbar:header44syn keyword htmlTagName contained navbar:footer navbar:prolog45syn keyword htmlTagName contained navbar:epilog navbar:button46syn keyword htmlTagName contained navbar:filter navbar:debug47syn keyword htmlTagName contained navbar:render48syn keyword htmlTagName contained preload rollover49syn keyword htmlTagName contained space hspace vspace over50syn keyword htmlTagName contained ps ds pi ein big sc spaced headline51syn keyword htmlTagName contained ue subheadline zwue verbcode52syn keyword htmlTagName contained isolatin pod sdf text url verbatim53syn keyword htmlTagName contained xtable54syn keyword htmlTagName contained csmap fsview import box55syn keyword htmlTagName contained case:upper case:lower56syn keyword htmlTagName contained grid cell info lang: logo page57syn keyword htmlTagName contained set-var restore58syn keyword htmlTagName contained array:push array:show set-var ifdef59syn keyword htmlTagName contained say m4 symbol dump enter divert60syn keyword htmlTagName contained toc61syn keyword htmlTagName contained wml card do refresh oneevent catch spawn62 63"64" The wml arguments65syn keyword htmlArg contained adjust background base bdcolor bdspace66syn keyword htmlArg contained bdwidth complete copyright created crop67syn keyword htmlArg contained direction description domainname eperlfilter68syn keyword htmlArg contained file hint imgbase imgstar interchar interline69syn keyword htmlArg contained keephr keepindex keywords layout spacing70syn keyword htmlArg contained padding nonetscape noscale notag notypo71syn keyword htmlArg contained onload oversrc pos select slices style72syn keyword htmlArg contained subselected txtcol_select txtcol_normal73syn keyword htmlArg contained txtonly via74syn keyword htmlArg contained mode columns localsrc ordered75 76 77" Lines starting with an # are usually comments78syn match   wmlComment     "^\s*#.*"79" The different exceptions to comments80syn match   wmlSharpBang   "^#!.*"81syn match   wmlUsed	   contained "\s\s*[A-Za-z:_-]*"82syn match   wmlUse	   "^\s*#\s*use\s\+" contains=wmlUsed83syn match   wmlInclude	   "^\s*#\s*include.+"84 85syn region  wmlBody	   contained start=+<<+ end=+>>+86 87syn match   wmlLocationId  contained "[A-Za-z]\+"88syn region  wmlLocation    start=+<<+ end=+>>+ contains=wmlLocationId89"syn region  wmlLocation    start=+{#+ end=+#}+ contains=wmlLocationId90"syn region  wmlLocationed  contained start=+<<+ end=+>>+ contains=wmlLocationId91 92syn match   wmlDivert      "\.\.[a-zA-Z_]\+>>"93syn match   wmlDivertEnd   "<<\.\."94" new version95"syn match   wmlDivert      "{#[a-zA-Z_]\+#:"96"syn match   wmlDivertEnd   ":##}"97 98syn match   wmlDefineName  contained "\s\+[A-Za-z-]\+"99syn region  htmlTagName    start="\<\(define-tag\|define-region\)" end="\>" contains=wmlDefineName100 101" The perl include stuff102if main_syntax != 'perl'103  " Perl script104  syn include @wmlPerlScript syntax/perl.vim105  unlet b:current_syntax106 107  syn region perlScript   start=+<perl>+ keepend end=+</perl>+ contains=@wmlPerlScript,wmlPerlTag108" eperl between '<:' and ':>'  -- Alfie [1999-12-26]109  syn region perlScript   start=+<:+ keepend end=+:>+ contains=@wmlPerlScript,wmlPerlTag110  syn match    wmlPerlTag  contained "</*perl>" contains=wmlPerlTagN111  syn keyword  wmlPerlTagN contained perl112 113  hi link   wmlPerlTag  htmlTag114  hi link   wmlPerlTagN htmlStatement115endif116 117" verbatim tags -- don't highlight anything in between  -- Alfie [2002-02-07]118syn region  wmlVerbatimText start=+<verbatim>+ keepend end=+</verbatim>+ contains=wmlVerbatimTag119syn match   wmlVerbatimTag  contained "</*verbatim>" contains=wmlVerbatimTagN120syn keyword wmlVerbatimTagN contained verbatim121hi link     wmlVerbatimTag  htmlTag122hi link     wmlVerbatimTagN htmlStatement123 124if main_syntax == "html"125  syn sync match wmlHighlight groupthere NONE "</a-zA-Z]"126  syn sync match wmlHighlight groupthere perlScript "<perl>"127  syn sync match wmlHighlightSkip "^.*['\"].*$"128  syn sync minlines=10129endif130 131" Define the default highlighting.132" Only when an item doesn't have highlighting yet133 134hi def link wmlNextLine	Special135hi def link wmlUse		Include136hi def link wmlUsed	String137hi def link wmlBody	Special138hi def link wmlDiverted	Label139hi def link wmlDivert	Delimiter140hi def link wmlDivertEnd	Delimiter141hi def link wmlLocationId	Label142hi def link wmlLocation	Delimiter143" hi def link wmlLocationed	Delimiter144hi def link wmlDefineName	String145hi def link wmlComment	Comment146hi def link wmlInclude	Include147hi def link wmlSharpBang	PreProc148 149 150let b:current_syntax = "wml"151 
codekingpro/portable-devtools · Team Ai