Commits

Shlomi Fish committed ebe52b6

Playing with getting eveything to work.

Trying to get the syntax to work properly.

  • Participants
  • Parent commits 2f68b91

Comments (0)

Files changed (1)

File syntax/screenplay-text.vim

 syntax region screenplayTextComment start="<!--" end="-->"
 syntax region screenplayTextDescription start="^ *\[" end="]"
 
-syntax match screenplayTextAddress /\n\@<!^\(+\{2,\}\|[^[:+]*\):/ contained nextgroup=screenplayTextInnerDesc
-syntax match screenplayTextInnerDesc /\[\_.\{-0,}\]/ contained nextgroup=screenplayTextInnerDesc
+" syntax region screenplayTextSaying start=/\(^\s*\n\)\@<=\_^\(+\{2,\}\|[^[:+]*\):/ end=/^\s*$/ contains=screenplayTextAddress,screenplayTextInnerDesc
+syntax region screenplayTextSaying start=/\(^\s*\n\)\@<=\_^\(+\{2,\}\|[^[:+]*\):/ end=/^\s*$/ contains=screenplayTextAddress
 
-syntax region screenplayTextSaying start=/^\s*\n^\(+\{2,\}\|[^[:+]*\):/ end=/^\s*$/ contains=screenplayTextAddress,screenplayTextInnerDesc
+" syntax match screenplayTextAddress /\%^\(+\{2,\}\|[^[:+]*\):/ contained nextgroup=screenplayTextInnerDesc
+syntax match screenplayTextAddress /[^:]\+:/ contained nextgroup=screenplayTextSayingAfterAddress
+
+syntax region screenplayTextSayingAfterAddress contained
+" syntax match screenplayTextInnerDesc /\[\_.\{-0,}\]/ contained nextgroup=screenplayTextInnerDesc
+
+
+" For debugging - remove.
+" hi def link screenplayTextSaying Statement
 
 hi def link screenplayTextComment Comment
 hi def link screenplayTextDescription PreProc