" originally taken from: " https://github.com/syusui-s/scrapbox-vim/blob/master/syntax/scrapbox.vim " Original Copyright: " Scrapbox Syntax Plugin " Maintainer: Syusui Moyatani " License: Creative Commons Zero 1.0 Universal " Version: 1.0.0 syn clear """ Brackets syn cluster pattoSBracketContent contains=pattoBig,pattoItalic,pattoStrike,pattoUnder,pattoBody,pattoInlineMath syn cluster pattoSBracketLink contains=pattoSLink1,pattoSLink2,pattoSLink3 "syn region pattoSLink keepend start=/\[/ms=s+1 end=/\]/me=e-1 contains=@pattoSBracketLink oneline transparent contained syn region pattoSBracket keepend start=/\[/ms=s+1 end=/\]/me=e-1 contains=@pattoSBracketLink oneline syn match pattoSBracketNoURL /\[\(.\+:\/\/\\*\)\@!.\{-}\]/ms=s+1,me=e-1 keepend contains=@pattoSBracketContent,pattoPageLink " [patto] " do not match url! " exe 'syn match pattoPageLink /\(.\{1,}:\/\/\S\{1,}\)\@!.\+/ contained' " exe 'syn match pattoPageLink /\(.\{1,}:\/\/.\*\)\@!.\{-}/ contained' "syn match pattoPageLink /^\(\(.\+:\/\/\\*\)\@!.\*\)$/ contained "syn match pattoPageLink /.\+/ contained syn match pattoPageLink /[^\[\]]\+/ contained " not sure why I need to exlude '[' " [-*/_ patto] syn match pattoBody /\s\{1,}[^\[\]]\+/ contained contains=@pattoSBracket transparent "syn match pattoBody /\s\{1,}.\+/ contained contains=@pattoBracket0,@pattoBracket1,@pattoBracket2,@pattoBracket3,@pattoBracket4,@pattoBracket5,@pattoBracket6,@pattoBracket7,@pattoBracket8,@pattoBracket9 transparent " [- patto] syn match pattoStrike /-\{1,}[^\[\]]\+/ contained contains=@pattoSBracketContent " [/ patto] syn match pattoItalic /\/\{1,}[^\[\]]\+/ contained contains=@pattoSBracketContent " [* patto] syn match pattoBig /\*\{1,}[^\[\]]\+/ contained contains=@pattoSBracketContent " [_ patto] syn match pattoUnder /_\{1,}[^\[\]]\+/ contained contains=@pattoSBracketContent " [$ patto$] syn include @tex syntax/tex.vim syn region pattoInlineMath start="\\\@