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/vim

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.


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.


--
Andy

--
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

Reply via email to