Thursday, September 16, 2010

Re: problems with 'syntax include' for nested Perl and R code regions

On Thu, 16 Sep 2010, hsitz wrote:

> On Sep 16, 12:31 am, "Benjamin R. Haskell" wrote:
>> That's the gist -- most syntax files are designed to be "main" syntax
>> files.  But, it's not too hard to work around.  Most of them set a
>> 'b:current_syntax' variable to prevent other syntax files from being
>> loaded.  So, you can just 'unlet' it.
>>
>> --
>> Best,
>> Ben
>>
>
> Ben -- Beautiful, thank you, the 'unlet' did the trick, and I will
> make use of your generalized code.
>
> For me including a Perl source region screws up all the colors in the
> document after it. Almost all words become same color for 100 lines
> or so, then all switch to a different color for a 100 lines or so,
> etc. etc.

It might be worth checking out the latest work from
http://github.com/petdance/vim-perl

Not sure if that's been incorporated back into the Vim hg repo. In my
experience, even though there are still a few warts, it's been much
better than the Perl filetype scripts that ship with 7.2.

As I mentioned, the colors are still wonky, but at least they don't run
over. If they still do, can you send a short example that produces the
problem?

--
Best,
Ben

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

No comments: