" Language: Nomsu " Maintainer: Bruce Hill " License: WTFPL " Bail if our syntax is already loaded. if exists('b:current_syntax') && b:current_syntax == 'nomsu' finish endif " Highlight long strings. syn sync minlines=100 hi def link nomsuInterpDelim PreProc syn region nomsuOneLineComment start=/#/ end=/$/ hi nomsuOneLineComment ctermfg=DarkBlue hi def link nomsuOneLineComment Comment syn region nomsuComment start=/\(^\z(\s*\)[^\n]*\)\@<=#/ skip=/\n\s*$/ end=/\n\(\z1\s\)\@!/ hi nomsuComment ctermfg=DarkBlue hi def link nomsuComment Comment syn region nomsuList start=/\[/ end=/\]/ contains=@nomsuAll,nomsuComma hi nomsuList ctermfg=Blue syn region nomsuDict start=/{/ end=/}/ contains=nomsuColon,nomsuComma,@nomsuAll hi nomsuDict ctermfg=Green syn region nomsuParenGroup start=/(/ end=/)/ contains=@nomsuAll hi nomsuParenGroup ctermfg=Yellow syn match nomsuLongTextStart /"\.\."/ contains=nomsuIndentor contained hi nomsuLongTextStart ctermfg=Gray syn match nomsuTextBackslash /\\\\/ contained hi nomsuTextBackslash ctermbg=Black ctermfg=Blue syn match nomsuTextEscapedQuote /\\"/ contained hi nomsuTextEscapedQuote ctermbg=Black ctermfg=Blue syn region nomsuInterp matchgroup=nomsuInterpDelim start=/\\(/ end=/)/ contained \ contains=@nomsuAll syn region nomsuInterpDotDot matchgroup=nomsuInterpDelim start=/\\$/ end=/\.\./ contained syn region nomsuLongTextValue start=/^/ end=/$/ contained \ contains=nomsuInterp,nomsuInterpDotDot,nomsuTextBackslash hi nomsuLongTextValue ctermfg=Gray hi def link nomsuLongTextValue Text syn region nomsuLongText start=/\(^\z(\s*\)[^\n]*\)\@<="\.\."/ skip=/^\s*$/ end=/^\(\z1\s\)\@!/ \ contains=nomsuLongTextStart,nomsuLongTextValue syn region nomsuText start=/\("\.\.\)\@?'-]+/ hi def link nomsuOpWord Function hi nomsuOpWord ctermfg=LightYellow syn match nomsuNumber /-\?\d\+\(\.\(\d\+\)\?\)\?/ syn match nomsuNumber /-\?\.\d\+/ hi def link nomsuNumber Number syn match nomsuDotDot /\.\./ hi def link nomsuDotDot Special hi nomsuDotDot ctermfg=DarkGray syn match nomsuComma /,/ hi nomsuComma ctermfg=Blue hi def link nomsuComma Delimiter syn match nomsuColon /:/ hi nomsuColon ctermfg=Yellow hi def link nomsuColon Delimiter syn match nomsuSemicolon /;/ hi nomsuSemicolon ctermfg=Blue hi def link nomsuSemicolon Delimiter syn cluster nomsuAll contains=nomsuParenGroup,nomsuText,nomsuLongText,nomsuComment,nomsuOneLineComment, \ nomsuVar,nomsuNumber,nomsuDict,nomsuList,nomsuColon,nomsuSemicolon,nomsuDotDot,nomsuWord, \ nomsuOpWord if !exists('b:current_syntax') let b:current_syntax = 'nomsu' endif