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

Syntax highlighting for select groups of variables?

Expand Messages
  • Larry Gray
    for example, a section of verilog code: // define input and output ports input A; output B; // main logic wire C; assign C = A & B; A,B and C are
    Message 1 of 2 , Sep 29, 2013
    • 0 Attachment
      for example, a section of verilog code:

      // define input and output ports
      input A;
      output B;

      // main logic
      wire C;
      assign C = A & B;

      A,B and C are all treated as variables, so displayed in the same color. I'm wondering if vim can use different color for A and B than C?


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

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Charles E Campbell
      ... syn keyword User1 A B syn keyword User2 C and define User1 and User2 to whatever you want. Now, that said: I suspect that what you want is for vim to be a
      Message 2 of 2 , Oct 7, 2013
      • 0 Attachment
        Larry Gray wrote:
        > for example, a section of verilog code:
        >
        > // define input and output ports
        > input A;
        > output B;
        >
        > // main logic
        > wire C;
        > assign C = A & B;
        >
        > A,B and C are all treated as variables, so displayed in the same color. I'm wondering if vim can use different color for A and B than C?
        >
        syn keyword User1 A B
        syn keyword User2 C

        and define User1 and User2 to whatever you want.

        Now, that said: I suspect that what you want is for vim to be a verilog
        interpreter; to dynamically determine that A, B, and C are input,
        output, and assign style variables. Vim is not a verilog interpreter,
        so it doesn't have a clue that A, B, and C are whatever types that
        verilog might have.

        Regards,
        C Campbell

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

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.