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

Re: VIM tags file builder for Verilog & SystemVerilo

Expand Messages
  • Tony Mechelynck
    ... The canonical docs (not a tutorial) are at man ctags and/or info ctags -- if you got them, which may depend on your system. Does the reply to ctags
    Message 1 of 10 , Jul 31, 2008
      On 01/08/08 05:49, Abhishek wrote:
      > I tried using tags for verilog but got stuck with ctags. Maybe its a
      > minor issue somewher. I haven't spent time looking for the problem
      > yet. Can anyone upload/point to a link with a tutorial on how to make
      > a verilog tag system work?
      > Regards,
      > Abhishek
      >
      The "canonical" docs (not a tutorial) are at "man ctags" and/or "info
      ctags" -- if you got them, which may depend on your system.

      Does the reply to "ctags --version" include "Exuberant Ctags"?


      Best regards,
      Tony.
      --
      Cynic, n.:
      A blackguard whose faulty vision sees things as they are, not
      as they ought to be. Hence the custom among the Scythians of plucking
      out a cynic's eyes to improve his vision.
      -- Ambrose Bierce, "The Devil's Dictionary"

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • googler
      On Jul 31, 11:27 pm, Tony Mechelynck ... I just tried using ctags on my Verilog files (but not SystemVerilog). It works fine
      Message 2 of 10 , Aug 1, 2008
        On Jul 31, 11:27 pm, Tony Mechelynck <antoine.mechely...@...>
        wrote:
        > On 01/08/08 05:49, Abhishek wrote:> I tried using tags for verilog but got stuck with ctags. Maybe its a
        > > minor issue somewher. I haven't spent time looking for the problem
        > > yet. Can anyone upload/point to a link with a tutorial on how to make
        > > a verilog tag system work?
        > > Regards,
        > > Abhishek
        >
        > The "canonical" docs (not a tutorial) are at "man ctags" and/or "info
        > ctags" -- if you got them, which may depend on your system.
        >
        > Does the reply to "ctags --version" include "Exuberant Ctags"?
        >
        > Best regards,
        > Tony.
        > --
        > Cynic, n.:
        >         A blackguard whose faulty vision sees things as they are, not
        > as they ought to be.  Hence the custom among the Scythians of plucking
        > out a cynic's eyes to improve his vision.
        >                 -- Ambrose Bierce, "The Devil's Dictionary"

        I just tried using ctags on my Verilog files (but not SystemVerilog).
        It works fine for the most part. However, I found one issue. There are
        two different files, say A and B, and each have a function defined
        within it with the same name. Each calls its respective function. But
        pressing CTRL-] on the function call in file A, takes me to the
        definition in file B.

        Is there a way I can go to the definition of a tag and it opens up in
        a new tab (especially useful if the definition is in a different
        file)? If I do CTRl-W CTRL-] it opens up in a new split window.
        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Tony Mechelynck
        ... see ... Any ex-command which opens a new window can be made to open a new tab instead, by prefixing it with :tab . So :tab tsel something will open a
        Message 3 of 10 , Aug 1, 2008
          On 02/08/08 00:02, googler wrote:
          >
          >
          > On Jul 31, 11:27 pm, Tony Mechelynck<antoine.mechely...@...>
          > wrote:
          >> On 01/08/08 05:49, Abhishek wrote:> I tried using tags for verilog but got stuck with ctags. Maybe its a
          >>> minor issue somewher. I haven't spent time looking for the problem
          >>> yet. Can anyone upload/point to a link with a tutorial on how to make
          >>> a verilog tag system work?
          >>> Regards,
          >>> Abhishek
          >> The "canonical" docs (not a tutorial) are at "man ctags" and/or "info
          >> ctags" -- if you got them, which may depend on your system.
          >>
          >> Does the reply to "ctags --version" include "Exuberant Ctags"?
          >>
          >> Best regards,
          >> Tony.
          >> --
          >> Cynic, n.:
          >> A blackguard whose faulty vision sees things as they are, not
          >> as they ought to be. Hence the custom among the Scythians of plucking
          >> out a cynic's eyes to improve his vision.
          >> -- Ambrose Bierce, "The Devil's Dictionary"
          >
          > I just tried using ctags on my Verilog files (but not SystemVerilog).
          > It works fine for the most part. However, I found one issue. There are
          > two different files, say A and B, and each have a function defined
          > within it with the same name. Each calls its respective function. But
          > pressing CTRL-] on the function call in file A, takes me to the
          > definition in file B.

          see
          :help :tselect
          :help :stselect

          >
          > Is there a way I can go to the definition of a tag and it opens up in
          > a new tab (especially useful if the definition is in a different
          > file)? If I do CTRl-W CTRL-] it opens up in a new split window.

          Any ex-command which opens a new window can be made to open a new tab
          instead, by prefixing it with ":tab". So ":tab tsel something" will open
          a new tab for the file containing "something", after showing you all
          occurrences of that tag and prompting you which one you want.


          Best regards,
          Tony.
          --
          hundred-and-one symptoms of being an internet addict:
          92. It takes you two hours to check all 14 of your mailboxes.

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • googler
          On Aug 1, 5:17 pm, Tony Mechelynck ... Thanks Tony. On using tselect command, I found that it is giving me only one option (the
          Message 4 of 10 , Aug 1, 2008
            On Aug 1, 5:17 pm, Tony Mechelynck <antoine.mechely...@...>
            wrote:
            > On 02/08/08 00:02, googler wrote:
            >
            > > I just tried using ctags on my Verilog files (but not SystemVerilog).
            > > It works fine for the most part. However, I found one issue. There are
            > > two different files, say A and B, and each have a function defined
            > > within it with the same name. Each calls its respective function. But
            > > pressing CTRL-] on the function call in file A, takes me to the
            > > definition in file B.
            >
            > see
            >         :help :tselect
            >         :help :stselect
            >
            Thanks Tony. On using tselect command, I found that it is giving me
            only one option (the definition in file B) for the problem I had
            described earlier. So it seems that ctags didn't build the tags file
            correctly for some reason.

            >
            > > Is there a way I can go to the definition of a tag and it opens up in
            > > a new tab (especially useful if the definition is in a different
            > > file)? If I do CTRl-W CTRL-] it opens up in a new split window.
            >
            > Any ex-command which opens a new window can be made to open a new tab
            > instead, by prefixing it with ":tab". So ":tab tsel something" will open
            > a new tab for the file containing "something", after showing you all
            > occurrences of that tag and prompting you which one you want.
            >

            Okay, this is cool.. I can now prefix my command with 'tab'. So say I
            want to go to the definition of 'something' directly, I type ':tab tag
            something'. This worked fine, but I need to type the word 'something',
            as opposed to simply pressing CTRL-] in the other case. Is there a way
            I can avoid typing the full word? I was wishing that there might be
            some register for this (hmm.. maybe that's a stupid thought as
            registers get their values from operations), but seems like there
            isn't.
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Ben Schmidt
            ... though it s awkard and you need to use exec as well. Perhaps a mapping ... You ll get a lot of tabs very quickly though! Perhaps mapping would
            Message 5 of 10 , Aug 1, 2008
              > Okay, this is cool.. I can now prefix my command with 'tab'. So say I
              > want to go to the definition of 'something' directly, I type ':tab tag
              > something'. This worked fine, but I need to type the word 'something',
              > as opposed to simply pressing CTRL-] in the other case. Is there a way
              > I can avoid typing the full word? I was wishing that there might be
              > some register for this (hmm.. maybe that's a stupid thought as
              > registers get their values from operations), but seems like there
              > isn't.

              :help <cword>

              though it's awkard and you need to use exec as well. Perhaps a mapping
              like this would do the trick for you:

              :map <C-]> :exec "tab tag ".expand('<lt>cword>')<CR>

              You'll get a lot of tabs very quickly though! Perhaps mapping <C-w><C-]>
              would be smarter so you can get a new tab only when you want one. I find
              usually <C-]> along with <C-t> or <C-o> is better than <C-w><C-]>.

              Ben.



              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Ben Schmidt
              ... O, and in addition to my previous post, there kinda is a register for this...well, you access it like a register! See ... So an alternative to the mapping
              Message 6 of 10 , Aug 1, 2008
                > Okay, this is cool.. I can now prefix my command with 'tab'. So say I
                > want to go to the definition of 'something' directly, I type ':tab tag
                > something'. This worked fine, but I need to type the word 'something',
                > as opposed to simply pressing CTRL-] in the other case. Is there a way
                > I can avoid typing the full word? I was wishing that there might be
                > some register for this (hmm.. maybe that's a stupid thought as
                > registers get their values from operations), but seems like there
                > isn't.

                O, and in addition to my previous post, there kinda is a register for
                this...well, you access it like a register! See

                :help c_CTRL-R_CTRL-F

                So an alternative to the mapping I wrote in my last post would be

                :map <C-]> :tab tag <C-R><C-W><CR>

                The comments in my last post about it still apply, of course.

                Ben.



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