Loading ...
Sorry, an error occurred while loading the content.
 

Is this #define highlighted right?

Expand Messages
  • Dasn
    $ cat test.c #define MAX 12 #define PIPE_SIZE (12) $ vim -Nu NONE +syn on test.c Please note the PIPE_SIZE. -- Dasn
    Message 1 of 9 , Apr 30, 2008
      $ cat test.c
      #define MAX 12
      #define PIPE_SIZE (12)

      $ vim -Nu NONE "+syn on" test.c

      Please note the PIPE_SIZE.

      --
      Dasn


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Ben Schmidt
      ... Looks fine to me. What do you see? Ben. --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_dev maillist. For
      Message 2 of 9 , Apr 30, 2008
        Dasn wrote:
        >
        > $ cat test.c
        > #define MAX 12
        > #define PIPE_SIZE (12)
        >
        > $ vim -Nu NONE "+syn on" test.c
        >
        > Please note the PIPE_SIZE.

        Looks fine to me. What do you see?

        Ben.





        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Dasn
        ... I get the MAX highlighted as Macro (which is fine), while the PIPE_SIZE is not highlighted. PIPE_SIZE shouldn t be the same look as the MAX ? ... --
        Message 3 of 9 , Apr 30, 2008
          On 01/05/08 11:04 +1000, Ben Schmidt wrote:
          >
          > Dasn wrote:
          > >
          > > $ cat test.c
          > > #define MAX 12
          > > #define PIPE_SIZE (12)
          > >
          > > $ vim -Nu NONE "+syn on" test.c
          > >
          > > Please note the PIPE_SIZE.
          >
          > Looks fine to me. What do you see?
          >
          I get the MAX highlighted as Macro (which is fine), while the PIPE_SIZE
          is not highlighted. 'PIPE_SIZE' shouldn't be the same look as the 'MAX'?

          :)

          --
          Dasn


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Dominique Pelle
          ... It works fine for me. Both MAX and PIPE_SIZE are highlighted as macros (cDefine highlight group). I m using vim-7.1.293 (huge) on Linux x86 in a gnome
          Message 4 of 9 , Apr 30, 2008
            On Thu, May 1, 2008 at 12:17 AM, Dasn <dasn@...> wrote:

            > $ cat test.c
            > #define MAX 12
            > #define PIPE_SIZE (12)
            >
            > $ vim -Nu NONE "+syn on" test.c
            >
            > Please note the PIPE_SIZE.

            It works fine for me. Both MAX and PIPE_SIZE are highlighted
            as macros (cDefine highlight group). I'm using vim-7.1.293
            (huge) on Linux x86 in a gnome terminal.

            By the way, you may want to put this in your ~/.vimrc in order
            to see the highlight group under the cursor:

            " top #99: How to tell what syntax highlighting group *that* is
            " see: http://vim.sourceforge.net/tips/tip.php?tip_id=99
            map <F10> :echo "hi<"
            \ . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
            \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
            \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name")
            \ . ">"<CR>

            When the cursor is on MAX or PIPE_SIZE, pressing F10 shows:

            hi<cDefine> trans<cDefine> lo<PreProcPreProc>

            -- Dominique

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Ben Schmidt
            ... The time you last updated your runtime files may also be significant. Mine were updated from the FTP server about a month ago, I think. And it seems to be
            Message 5 of 9 , May 1, 2008
              Dominique Pelle wrote:
              > On Thu, May 1, 2008 at 12:17 AM, Dasn <dasn@...> wrote:
              >
              >> $ cat test.c
              >> #define MAX 12
              >> #define PIPE_SIZE (12)
              >>
              >> $ vim -Nu NONE "+syn on" test.c
              >>
              >> Please note the PIPE_SIZE.
              >
              > It works fine for me. Both MAX and PIPE_SIZE are highlighted
              > as macros (cDefine highlight group). I'm using vim-7.1.293
              > (huge) on Linux x86 in a gnome terminal.

              The time you last updated your runtime files may also be significant. Mine were
              updated from the FTP server about a month ago, I think. And it seems to be Vim
              7.1.285 that I'm currently running in the console. And it is all correct for me.

              Smiles,

              Ben.





              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_dev" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Dasn
              ... I m afraid that my expression was not that clear. Actually I mean the colors of MAX and PIPE_SIZE are different. For example, in my terminal, the color
              Message 6 of 9 , May 1, 2008
                On 01/05/08 20:42 +1000, Ben Schmidt wrote:
                > >> $ cat test.c
                > >> #define MAX 12
                > >> #define PIPE_SIZE (12)
                > >>
                > >> $ vim -Nu NONE "+syn on" test.c
                > >>
                > >> Please note the PIPE_SIZE.
                > >
                > > It works fine for me. Both MAX and PIPE_SIZE are highlighted
                > > as macros (cDefine highlight group). I'm using vim-7.1.293
                > > (huge) on Linux x86 in a gnome terminal.
                >
                > The time you last updated your runtime files may also be significant.
                > Mine were updated from the FTP server about a month ago, I think. And
                > it seems to be Vim 7.1.285 that I'm currently running in the console.
                > And it is all correct for me.
                >

                I'm afraid that my expression was not that clear. Actually I mean the
                colors of 'MAX' and 'PIPE_SIZE' are different. For example, in my
                terminal, the color of MAX is Dark Magenta while the PIPE_SIZE is
                highlighted as grey. I'm using the 7.1-293 with current runtime files.

                --
                Dasn


                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_dev" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Tony Mechelynck
                ... Have you set cursorline ? If yes, then it s normal -- move the cursor to the other line and /that/ will become grey. Best regards, Tony. -- I m returning
                Message 7 of 9 , May 1, 2008
                  On 02/05/08 00:01, Dasn wrote:
                  > On 01/05/08 20:42 +1000, Ben Schmidt wrote:
                  >>>> $ cat test.c
                  >>>> #define MAX 12
                  >>>> #define PIPE_SIZE (12)
                  >>>>
                  >>>> $ vim -Nu NONE "+syn on" test.c
                  >>>>
                  >>>> Please note the PIPE_SIZE.
                  >>> It works fine for me. Both MAX and PIPE_SIZE are highlighted
                  >>> as macros (cDefine highlight group). I'm using vim-7.1.293
                  >>> (huge) on Linux x86 in a gnome terminal.
                  >> The time you last updated your runtime files may also be significant.
                  >> Mine were updated from the FTP server about a month ago, I think. And
                  >> it seems to be Vim 7.1.285 that I'm currently running in the console.
                  >> And it is all correct for me.
                  >>
                  >
                  > I'm afraid that my expression was not that clear. Actually I mean the
                  > colors of 'MAX' and 'PIPE_SIZE' are different. For example, in my
                  > terminal, the color of MAX is Dark Magenta while the PIPE_SIZE is
                  > highlighted as grey. I'm using the 7.1-293 with current runtime files.
                  >

                  Have you set 'cursorline'? If yes, then it's normal -- move the cursor
                  to the other line and /that/ will become grey.

                  Best regards,
                  Tony.
                  --
                  "I'm returning this note to you, instead of your paper, because it
                  (your paper) presently occupies the bottom of my bird cage."
                  -- English Professor, Providence College

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_dev" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Dasn
                  ... Well, a picture is worth a thousand words. Please check the picture I attached this time. :) -- Dasn --~--~---------~--~----~------------~-------~--~----~
                  Message 8 of 9 , May 1, 2008
                    On 02/05/08 01:10 +0200, Tony Mechelynck wrote:
                    >
                    > On 02/05/08 00:01, Dasn wrote:
                    > > On 01/05/08 20:42 +1000, Ben Schmidt wrote:
                    > >>>> $ cat test.c
                    > >>>> #define MAX 12
                    > >>>> #define PIPE_SIZE (12)
                    > >>>>
                    > >>>> $ vim -Nu NONE "+syn on" test.c
                    > >>>>
                    > >>>> Please note the PIPE_SIZE.
                    > >>> It works fine for me. Both MAX and PIPE_SIZE are highlighted
                    > >>> as macros (cDefine highlight group). I'm using vim-7.1.293
                    > >>> (huge) on Linux x86 in a gnome terminal.
                    > >> The time you last updated your runtime files may also be significant.
                    > >> Mine were updated from the FTP server about a month ago, I think. And
                    > >> it seems to be Vim 7.1.285 that I'm currently running in the console.
                    > >> And it is all correct for me.
                    > >>
                    > >
                    > > I'm afraid that my expression was not that clear. Actually I mean the
                    > > colors of 'MAX' and 'PIPE_SIZE' are different. For example, in my
                    > > terminal, the color of MAX is Dark Magenta while the PIPE_SIZE is
                    > > highlighted as grey. I'm using the 7.1-293 with current runtime files.
                    > >
                    >
                    > Have you set 'cursorline'? If yes, then it's normal -- move the cursor
                    > to the other line and /that/ will become grey.
                    >
                    > Best regards,
                    > Tony.

                    Well, a picture is worth a thousand words.
                    Please check the picture I attached this time. :)

                    --
                    Dasn

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_dev" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • Dasn
                    ... I almost forget I have kept some function highlighting stuff in ~/.vim/after/syntax/c.vim. Sorry for the noise, it s my fault. -- Dasn
                    Message 9 of 9 , May 1, 2008
                      On 02/05/08 07:49 +0800, Dasn wrote:
                      > On 02/05/08 01:10 +0200, Tony Mechelynck wrote:
                      > >
                      > > On 02/05/08 00:01, Dasn wrote:
                      > > > On 01/05/08 20:42 +1000, Ben Schmidt wrote:
                      > > >>>> $ cat test.c
                      > > >>>> #define MAX 12
                      > > >>>> #define PIPE_SIZE (12)
                      > > >>>>
                      > > >>>> $ vim -Nu NONE "+syn on" test.c
                      > > >>>>
                      > > >>>> Please note the PIPE_SIZE.
                      > > >>> It works fine for me. Both MAX and PIPE_SIZE are highlighted
                      > > >>> as macros (cDefine highlight group). I'm using vim-7.1.293
                      > > >>> (huge) on Linux x86 in a gnome terminal.
                      > > >> The time you last updated your runtime files may also be significant.
                      > > >> Mine were updated from the FTP server about a month ago, I think. And
                      > > >> it seems to be Vim 7.1.285 that I'm currently running in the console.
                      > > >> And it is all correct for me.
                      > > >>
                      > > >
                      > > > I'm afraid that my expression was not that clear. Actually I mean the
                      > > > colors of 'MAX' and 'PIPE_SIZE' are different. For example, in my
                      > > > terminal, the color of MAX is Dark Magenta while the PIPE_SIZE is
                      > > > highlighted as grey. I'm using the 7.1-293 with current runtime files.
                      > > >
                      > >
                      > > Have you set 'cursorline'? If yes, then it's normal -- move the cursor
                      > > to the other line and /that/ will become grey.
                      > >
                      > > Best regards,
                      > > Tony.
                      >
                      > Well, a picture is worth a thousand words.
                      > Please check the picture I attached this time. :)
                      >

                      I almost forget I have kept some function highlighting stuff in
                      ~/.vim/after/syntax/c.vim. Sorry for the noise, it's my fault.
                      --
                      Dasn


                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_dev" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    Your message has been successfully submitted and would be delivered to recipients shortly.