" Vim syntax file " Language: Jade " Maintainer: Joshua Borton " Credits: Tim Pope " Filenames: *.jade if exists("b:current_syntax") finish endif if !exists("main_syntax") let main_syntax = 'jade' endif runtime! syntax/html.vim unlet! b:current_syntax syn case match syn cluster jadeTop contains=jadeBegin,jadeComment syn match jadeBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=jadeTag,jadeClassChar,jadeIdChar,jadePlainChar syn match jadeTag "\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@jadeComponent syn cluster jadeComponent contains=jadeAttributes,jadeIdChar,jadeClassChar,jadePlainChar syn match jadeComment ' *\/\/.*$' syn region jadeAttributes matchgroup=jadeAttributesDelimiter start="(" skip=+\%(\\\\\)*\\'+ end=")" contained contains=htmlArg,jadeAttributeString,htmlEvent,htmlCssDefinition nextgroup=@jadeComponent syn match jadeClassChar "\." contained nextgroup=jadeClass syn match jadeIdChar "#{\@!" contained nextgroup=jadeId syn match jadeClass "\%(\w\|-\)\+" contained nextgroup=@jadeComponent syn match jadeId "\%(\w\|-\)\+" contained nextgroup=@jadeComponent syn region jadeDocType start="^\s*!!!" end="$" syn match jadePlainChar "\\" contained syn region jadeInterpolation matchgroup=jadeInterpolationDelimiter start="#{" end="}" contains=@htmlJavaScript syn match jadeInterpolationEscape "\\\@