Some fixes to longstrings.
This commit is contained in:
parent
041ebceae5
commit
875b009e41
@ -21,7 +21,7 @@ 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=/"\(\.\."\)\@!/ skip=/\\\\\|\\"/ end=/"/
|
||||
hi def link nomsuString1 String
|
||||
|
||||
syn match nomsuStringLineStart /\(^[ \t]*\|"\.\."\s*\)\@<=|/ contained
|
||||
@ -30,11 +30,8 @@ syn match nomsuStringTrailingSpace /[ \t]*$/ contained
|
||||
hi nomsuStringTrailingSpace ctermbg=Magenta
|
||||
|
||||
|
||||
syn region nomsuLongString2 start=/"\.\."\s*|/ end=/$/
|
||||
\ contains=nomsuInterp,nomsuStringLineStart,nomsuStringTrailingSpace
|
||||
hi def link nomsuLongString2 String
|
||||
syn region nomsuLongString start=/"\.\.".*$\n\(\s*\n\)*\z(\s\+\)\S/ skip=/^\%(\z1\S\|^\s*$\)/ end=/^\z1\@!.*/me=s-1
|
||||
\ contains=nomsuInterp,nomsuStringLineStart,nomsuStringTrailingSpace
|
||||
syn region nomsuLongString start=/\(^\z(\s*\)\S.*\)\@<="\.\."/ skip=/^\(\z1\s\|\s*$\)/ end=/\n\(\z1\s\)\@!/me=s-1
|
||||
\ contains=nomsuInterp,nomsuStringLineStart,nomsuStringTrailingSpace,nomsuOneLineComment,nomsuComment
|
||||
hi def link nomsuLongString String
|
||||
|
||||
syn match nomsuVar /\v\%[a-zA-Z0-9_'+*/^&$@#-]*/
|
||||
@ -62,7 +59,7 @@ hi def link nomsuThunk Structure
|
||||
syn match nomsuToken /\v(\%)@<!\%[a-zA-Z_'+*/^&$@#-][a-zA-Z0-9_'+*/^&$@#-]*/
|
||||
hi def link nomsuToken Function
|
||||
|
||||
syn cluster nomsuAll contains=nomsuString1,nomsuLongString,nomsuLongString2,nomsuComment,
|
||||
syn cluster nomsuAll contains=nomsuString1,nomsuLongString,nomsuComment,
|
||||
\ nomsuVar,nomsuNumber,nomsuComma,nomsuThunk,nomsuIndentor,nomsuToken
|
||||
|
||||
if !exists('b:current_syntax')
|
||||
|
Loading…
Reference in New Issue
Block a user