On Tue, 25 Jan 2011, Gustavo Niemeyer wrote:
(Charles Campbell wrote:)
Perhaps the following will be of interest:
syn on
syn clear
[ed. followed by your original :syn/:hi commands]
Sorry, but I don't understand what you mean. You've provided exactly
the same syntax logic I did, but reordered, and your version continues
to expose the same bug.
How are you testing this?
I have a file identical to what you've provided for your syntax:
===> /tmp/test-vim-syntax.vim <===
syn sync match fooSync grouphere NONE /^foo\>/
syn region fooString start=+"+ end=+"+
hi def link fooString String
==================================
And a sample file:
===> /tmp/foo.txt <===
foo = "
asdf (<-- this line repeated 50 times)
"
======================
Then, running:
vim -u NONE -i NONE -N +'so /tmp/test-vim-syntax.vim' + ~/tmp/foo.txt
The double quotes aren't colorized.
Running:
vim -u NONE -i NONE -N +'syn on' +'syn clear' +'so /tmp/test-vim-syntax.vim' +
~/tmp/foo.txt
They are.
You'll have to be more precise about your set up to reproduce the "bug".
In the other thread, I don't understand why you think ':help syn-sync'
isn't applicable. If your sync settings are such that 50 lines is too
many to sync across, it's not going to work. E.g. Adding:
+'syn sync minlines=10 maxlines=30' to my working example above:
vim -u NONE -i NONE -N +'syn on' +'syn clear' +'syn sync minlines=10
maxlines=30' +'so /tmp/test-vim-syntax.vim' + ~/tmp/foo.txt
the colors are wrong, as explained in ':help syn-sync'
See:
:help :syn-sync-second
and
:help :syn-sync-third
for more.
--
Best,
Ben
--
You received this message from the "vim_dev" 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