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

suggestion for matchhit settings

Expand Messages
  • ankitks
    I need to navigate between verilog code and I tried few settings with matchit but I don t have any success. Problem is I need to match begin:end ,
    Message 1 of 3 , Mar 1, 2010
    • 0 Attachment
      I need to navigate between verilog code and I tried few settings with
      matchit but I don't have any success.
      Problem is I need to match "begin:end", "case:endcase" independently.
      I end up getting also match for begin:endcase.

      Here is pseudo verilog code
      always @(posedge clk) begin
      case(index)
      1: $display();
      default: $error();
      endcase
      end

      Also, Just wondering, anyone has matchit settings for verilog/
      systemverilog.



      --
      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
    • Tony Mechelynck
      ... The current verilog filetype-plugin, dated Last Change: Wed Sep 3 15:24:49 CST 2008 , and which you should have as $VIMRUNTIME/ftplugin/verilog.vim,
      Message 2 of 3 , Mar 2, 2010
      • 0 Attachment
        On 01/03/10 18:21, ankitks wrote:
        > I need to navigate between verilog code and I tried few settings with
        > matchit but I don't have any success.
        > Problem is I need to match "begin:end", "case:endcase" independently.
        > I end up getting also match for begin:endcase.
        >
        > Here is pseudo verilog code
        > always @(posedge clk) begin
        > case(index)
        > 1: $display();
        > default: $error();
        > endcase
        > end
        >
        > Also, Just wondering, anyone has matchit settings for verilog/
        > systemverilog.
        >
        >
        >

        The current verilog filetype-plugin, dated "Last Change: Wed Sep 3
        15:24:49 CST 2008", and which you should have as
        $VIMRUNTIME/ftplugin/verilog.vim, includes a b:match_words setting whose
        patterns appropriately check for begin-of-word and end-of-word. So in
        this case the solution is quite simple:

        - Make sure that your $VIMRUNTIME/ftplugin/verilog.vim is up-to-date by
        checking the "Last Change" on line 4 of the file.

        - Make sure that your vimrc includes _just one_ of the following lines:

        runtime vimrc_example.vim
        source $VIMRUNTIME/vimrc_example.vim
        filetype plugin on
        filetype plugin indent on

        so that filetypes are detected and filetype-plugins sounced. If none of
        these lines are present, add one of them near the start of your vimrc,
        then restart Vim.

        - Make sure that the "verilog" filetype of the problematic file is
        correctly detected, i.e., once the file is loaded to be edited,

        :setlocal filetype?

        should answer

        filetype=verilog

        If that is _not_ the case, use

        :setlocal ft=verilog

        as a temporary workaround, then come back here, or better, read

        :help new-filetype

        to learn how to detect that particular file as a verilog file.

        That's all.


        Best regards,
        Tony.
        --
        "I don't object to sex before marriage, but two minutes before?!?"

        --
        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
      • Ankit Shah
        That does it Thank you for such a great suggestion Best Regards, Ankit On Mar 2, 2010, at 6:19 AM, Tony Mechelynck
        Message 3 of 3 , Mar 3, 2010
        • 0 Attachment
          That does it
          Thank you for such a great suggestion

          Best Regards,
          Ankit

          On Mar 2, 2010, at 6:19 AM, Tony Mechelynck <antoine.mechelynck@...
          > wrote:

          > On 01/03/10 18:21, ankitks wrote:
          >> I need to navigate between verilog code and I tried few settings with
          >> matchit but I don't have any success.
          >> Problem is I need to match "begin:end", "case:endcase" independently.
          >> I end up getting also match for begin:endcase.
          >>
          >> Here is pseudo verilog code
          >> always @(posedge clk) begin
          >> case(index)
          >> 1: $display();
          >> default: $error();
          >> endcase
          >> end
          >>
          >> Also, Just wondering, anyone has matchit settings for verilog/
          >> systemverilog.
          >>
          >>
          >>
          >
          > The current verilog filetype-plugin, dated "Last Change: Wed Sep
          > 3 15:24:49 CST 2008", and which you should have as $VIMRUNTIME/
          > ftplugin/verilog.vim, includes a b:match_words setting whose
          > patterns appropriately check for begin-of-word and end-of-word. So
          > in this case the solution is quite simple:
          >
          > - Make sure that your $VIMRUNTIME/ftplugin/verilog.vim is up-to-date
          > by checking the "Last Change" on line 4 of the file.
          >
          > - Make sure that your vimrc includes _just one_ of the following
          > lines:
          >
          > runtime vimrc_example.vim
          > source $VIMRUNTIME/vimrc_example.vim
          > filetype plugin on
          > filetype plugin indent on
          >
          > so that filetypes are detected and filetype-plugins sounced. If none
          > of these lines are present, add one of them near the start of your
          > vimrc, then restart Vim.
          >
          > - Make sure that the "verilog" filetype of the problematic file is
          > correctly detected, i.e., once the file is loaded to be edited,
          >
          > :setlocal filetype?
          >
          > should answer
          >
          > filetype=verilog
          >
          > If that is _not_ the case, use
          >
          > :setlocal ft=verilog
          >
          > as a temporary workaround, then come back here, or better, read
          >
          > :help new-filetype
          >
          > to learn how to detect that particular file as a verilog file.
          >
          > That's all.
          >
          >
          > Best regards,
          > Tony.
          > --
          > "I don't object to sex before marriage, but two minutes before?!?"

          --
          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
        Your message has been successfully submitted and would be delivered to recipients shortly.