On 2016年05月31日 15:55, Erik Wognsen wrote:
Hi Yubin,

I'm fairly busy at the moment, but I'll try to look at it soon!

Best regards,
Erik Wognsen

On May 31, 2016 04:41, "Yubin Ruan" <[email protected]
<mailto:[email protected]>> wrote:

    hi, I am working with some gas asm program and I have some problem
    with the syntax highlighting.
    I find a bug, and fix it like this in my .vimrc:

         autocmd FileType asm syn match asmInclude "#include.*"
         autocmd FileType asm hi def link asmInclude Include

    This make vim highlight the "#include" part(gas allow including
    files). Actually I don't know whether this is a bug or just a
    feature and whether I should post a "patch" or something ?


    But I still cannot fix another bug: it cannot highlight gas macro
    properly. For example, a line like this cannot be highlighted properly:

       SEG_ASM(STA_X|STA_R, 0x0, 0xffffffff)

    The part after the '|' cannot be highlighted. In this line,
    "SEG_ASM", "STA_X" and "STA_R" are all macro.
    However,If I write something like this, the syntax highlighting work
    pretty well.

       SEG_ASM(STA_X, 0x0, 0xffffffff)

    I can't find the line in asm.vim under /usr/share/vim/vim74/syntax
    which handle this job. Can anyone help ?

    Regards,
    Ruan


Hi, thanks for your reply.
I have find more bugs in vim's asm syntax highlighting. Hope that you can help fix that: It's about the section declaration. When declaring a section in an asm file, we write things like this in gas syntax:
        .section_name
However, while the ".section" in this declaration get highlighted properly, the "_name" part not. For example, when writing a hello world C program like this:
        #include<stdio.h>
        int main()
        {
                printf("Hello World\n");
                return 0;
        }
and compile it using "gcc main.c -S", you can see that many section declarations, like ".cfi_endproc", are not highlighted properly in the resulting asm file.(I am using gcc-4.8 under Ubuntu)

Another thing about section declaration that I don't know it's a bug or feature: when highlighting a section declaration like "LFE0" in a gas asm file, the color of the "LFE" and that of "0" is different. I think it look weird and it maybe due to some regex problems.

That's all, thanks.
And, I have noticed in the comments you put in asm.vim that many syntax highlighting problems is due to the fact that there are so many flavors of asm syntax out there. I am interested in that, and if all that I have said is due to that, please let be know.

Regards,
Ruan


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

--- You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui