Hi Andy,
On Wednesday 20 Apr 2011 11:26:06 Andy Wokula wrote:
> Am 19.04.2011 10:59, schrieb Shlomi Fish:
> > Hi all,
> >
> > I prepared a partial syntax file for Screenplay-Text here:
> >
> > http://svn.berlios.de/svnroot/repos/web-cpan/XML-Grammar-Fiction/trunk/vi
> > m
> >
> > It's attached to this message.
> >
> > You can learn more about Screenplay-Text here - http://xrl.us/bjswbo .
> > Here are the homepages of the implementation:
> >
> > http://www.shlomifish.org/open-source/projects/XML-Grammar/Fiction/
> >
> > http://web-cpan.berlios.de/modules/XML-Grammar-Screenplay/
> >
> > The problem is that when I edit a screenplay, often the highlighting of
> > the addressing disappears and other weird stuff happens and I don't know
> > what I'm doing wrong. I'm attaching here a sample screenplay (under
> > CC-by-sa). If I position the screen starting from line 7, and then I
> > travel with the cursor up and down, then I get that part of the
> > description (what comes between "[" and "]") gets unhighlighted, and
> > lots of other stuff like that when editing a screenplay.
> >
> > There are similar screenplays that exhibit similar problems here:
> >
> > http://www.shlomifish.org/humour/stories/
> >
> > Can anyone instruct me how to fix it?
> >
> > Regards,
> >
> > Shlomi Fish
>
> No answers yet, so I have a few hints ...
>
>
> You should add a syncing rule, for example
>
> :syn sync minlines=50
> :
> :h :syn-sync
>
> " there are more methods!
>
>
> Multi-line matches like the following
>
> :syntax match screenplayTextComment /<!--\_.\{-0,}-->/
> :syntax match screenplayTextDescription /^ *\[\_.\{-0,}\]/
>
> are better written using :syn-region
>
> :syntax region screenplayTextDescription start="^ *\[" end="]"
>
> etc.
Thanks! After I incorporated some of these suggestions, everything works much
better. I'm now thanking you in the source file. If you'd like me to include a
link to your homepage / blog / etc. in the source as well, please let me know,
and I'll be happy to do so.
>
>
> This does nothing:
>
> let b:current_syntax="ScreenplayText"
> runtime! syntax/xml.vim
>
> ... syntax/xml.vim immediately finishes when b:current_syntax is set.
>
> Could be this was your way of commenting out the :runtime statement ...
> I guess you will only want to borrow a few rules from the xml syntax
> file and not include it completely.
I see, OK, I will.
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Understand what Open Source is - http://shlom.in/oss-fs
Sisko: Q: would it be OK if my crew brough along their phasers with them?
Q: Of course. They can also bring some photon torpedoes if they wish. None of
them will work, but I don't mind them taking them.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php