diff --git a/syntax/nomsu.vim b/syntax/nomsu.vim index 071aa10..068342a 100644 --- a/syntax/nomsu.vim +++ b/syntax/nomsu.vim @@ -21,16 +21,20 @@ hi def link nomsuOneLineComment Comment syn region nomsuComment start=/#\.\.[^\n]*$\n\(\s*\n\)*\z(\s\+\)\S/ skip=/^\%(\z1\S\|^\s*$\)/ end=/^\z1\@!.*/me=s-1 hi def link nomsuComment Comment -syn region nomsuString1 start=/"\(\.\."\)\@!/ skip=/\\\\\|\\"/ end=/"/ +syn region nomsuString1 start=/"\(\(\.\."\)\@!\|\.\."\s*|.*$\)/ skip=/\\\\\|\\"/ end=/"/ hi def link nomsuString1 String +syn region nomsuStringLine start=/"\.\."/ end=/$/ +\ contains=nomsuInterp,nomsuStringLineStart,nomsuStringTrailingSpace,nomsuOneLineComment,nomsuComment +hi def link nomsuStringLine String + syn match nomsuStringLineStart /\(^[ \t]*\|"\.\."\s*\)\@<=|/ contained hi def link nomsuStringLineStart Delimiter syn match nomsuStringTrailingSpace /[ \t]*$/ contained hi nomsuStringTrailingSpace ctermbg=Magenta -syn region nomsuLongString start=/\(^\z(\s*\)\S.*\)\@<="\.\."/ skip=/^\(\z1\s\|\s*$\)/ end=/\n\(\z1\s\)\@!/me=s-1 +syn region nomsuLongString start=/"\.\."[^\n]*$\n\(\s*\n\)*\z(\s\+\)\S/ skip=/^\%(\z1\S\|^\s*$\)/ end=/^\z1\@!.*/me=s-1 \ contains=nomsuInterp,nomsuStringLineStart,nomsuStringTrailingSpace,nomsuOneLineComment,nomsuComment hi def link nomsuLongString String