On 8/28/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
Yongwei Wu wrote: [...] > However, it is only a *little* better. Scroll down to make the first > comment line disappear on the top of the Vim window, and press Ctrl-L, > highlighting will have problems. C comments have not this problem. > > More clues? > > Best regards, > > YongweiSee the various flavours of the ":syntax sync" command: :help :syn-sync :help :syn-sync-maxlines :help :syn-sync-linebreaks :help :syn-sync-first " fromstart :help :syn-sync-second " ccomment :help :syn-sync-third " minlines :help :syn-sync-fourth " patterns: grouphere, groupthere, linecount
Thanks! I believe syn sync minlines should work in most of the cases. However, I do find that there is some magic in C. Just save my syntax file as c.vim in vimfiles\syntax, and the test.asm file (renamed as test.c) works perfectly. Check attachment if interested. Anyone knows where the magic is? -- Wu Yongwei URL: http://wyw.dcweb.cn/
c.vim
Description: Binary data
.386P
.MODEL FLAT, C
COMMENT *
This is some comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
More comment
COMMENT * trailing text
.CODE
mov ax, 1
.DATA
warn DB 'Can''t find file.' ; Can't find file.
END
