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

omni for CTRL-]

Expand Messages
  • Mikalai Chaly
    Hello, vim developers. I m trying to figure out how jump to tag function can be improved. In C# project with multiple overridden virtual methods original
    Message 1 of 6 , Oct 5, 2009
    • 0 Attachment
      Hello, vim developers.

      I'm trying to figure out how "jump to tag" function can be improved.
      In C# project with multiple overridden virtual methods original Ctrl-]
      behaviour is not very useful.

      So, I've reviewed todo.txt file and found the following action item marked with "8":

      "Use a mechanism similar to omni completion to figure out the kind of tab
      for CTRL-] and jump to the appropriate matching tag (if there are
      several)."

      Is there a way to find out who is working on this, if any? I'd like to help to implement
      and/or test this functionality.

      Sincerely,
      Mikalai




      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---

    • Christophe-Marie Duquesne
      I don t know who is working on that. But I can give you a tip I use in C++: I use cscope and the cscopequickfix option, which enables me to cycle on virtual
      Message 2 of 6 , Oct 5, 2009
      • 0 Attachment
        I don't know who is working on that. But I can give you a tip I use in
        C++: I use cscope and the cscopequickfix option, which enables me to
        cycle on virtual methods with :cnext and :cprevious. Using the plugin
        cscope_map.vim, I think you can tweak your vimrc to get what you want.

        On Mon, Oct 5, 2009 at 12:52 PM, Mikalai Chaly <nchaly@...> wrote:
        > Hello, vim developers.
        >
        > I'm trying to figure out how "jump to tag" function can be improved.
        > In C# project with multiple overridden virtual methods original Ctrl-]
        > behaviour is not very useful.
        >
        > So, I've reviewed todo.txt file and found the following action item marked
        > with "8":
        >
        > "Use a mechanism similar to omni completion to figure out the kind of tab
        > for CTRL-] and jump to the appropriate matching tag (if there are
        > several)."
        >
        > Is there a way to find out who is working on this, if any? I'd like to help
        > to implement
        > and/or test this functionality.
        >
        > Sincerely,
        > Mikalai
        >
        >
        >
        >
        > >
        >



        --
        Christophe-Marie Duquesne

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Dominique Pellé
        ... I m not aware of anybody working on it. In my ~/.vimrc, I have the following map... noremap g ... which helps a bit. When CTRL-] has multiple
        Message 3 of 6 , Oct 5, 2009
        • 0 Attachment
          Mikalai Chaly wrote:

          > Hello, vim developers.
          >
          > I'm trying to figure out how "jump to tag" function can be improved.
          > In C# project with multiple overridden virtual methods original Ctrl-]
          > behaviour is not very useful.
          >
          > So, I've reviewed todo.txt file and found the following action item marked
          > with "8":
          >
          > "Use a mechanism similar to omni completion to figure out the kind of tab
          > for CTRL-] and jump to the appropriate matching tag (if there are
          > several)."
          >
          > Is there a way to find out who is working on this, if any? I'd like to help
          > to implement
          > and/or test this functionality.
          >
          > Sincerely,
          > Mikalai

          I'm not aware of anybody working on it.

          In my ~/.vimrc, I have the following map...

          noremap <c-]> g<c-]>

          ... which helps a bit. When CTRL-] has multiple matches
          (overloaded functions, derivation...) it will show a list of all
          matches at let you select the one you want, rather than
          jumping to the first match.

          See :help g_CTRL-]

          Regards
          -- Dominique

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_dev" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Hari Krishna Dara
          ... I do the samething, and when the list is more than 1 page (as it is often), it is hard to find the relevant match, so I created a small plugin called
          Message 4 of 6 , Oct 5, 2009
          • 0 Attachment
            2009/10/5 Dominique Pellé <dominique.pelle@...>:
            >
            > Mikalai Chaly wrote:
            >
            >> Hello, vim developers.
            >>
            >> I'm trying to figure out how "jump to tag" function can be improved.
            >> In C# project with multiple overridden virtual methods original Ctrl-]
            >> behaviour is not very useful.
            >>
            >> So, I've reviewed todo.txt file and found the following action item marked
            >> with "8":
            >>
            >> "Use a mechanism similar to omni completion to figure out the kind of tab
            >> for CTRL-] and jump to the appropriate matching tag (if there are
            >> several)."
            >>
            >> Is there a way to find out who is working on this, if any? I'd like to help
            >> to implement
            >> and/or test this functionality.
            >>
            >> Sincerely,
            >> Mikalai
            >
            > I'm not aware of anybody working on it.
            >
            > In my ~/.vimrc, I have the following map...
            >
            > noremap <c-]> g<c-]>
            >
            > ... which helps a bit. When CTRL-] has multiple matches
            > (overloaded functions, derivation...) it will show a list of all
            > matches at let you select the one you want, rather than
            > jumping to the first match.
            >
            > See :help g_CTRL-]

            I do the samething, and when the list is more than 1 page (as it is
            often), it is hard to find the relevant match, so I created a small
            plugin called tagselect to show the output in a new buffer. You can
            then scroll and search like any buffer and press enter to select.

            http://www.vim.org//script.php?script_id=1282

            Note that the plugin executes the :ts command again to enter the
            selected tag number, but because of a vim bug, the command doesn't
            work if executed using :silent, so the list scrolls in front of you,
            but it works.

            --
            Thanks,
            Hari

            >
            > Regards
            > -- Dominique
            >
            > >
            >

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_dev" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Mikalai Chaly
            ... Thank you very much for all the answers. I understand enhancements you propose. I m trying to make it a way to not select tag manually at all (in most
            Message 5 of 6 , Oct 6, 2009
            • 0 Attachment
              On Mon, Oct 5, 2009 at 7:26 PM, Hari Krishna Dara <hari.vim@...> wrote:

              2009/10/5 Dominique Pellé <dominique.pelle@...>:
              >
              > Mikalai Chaly wrote:
              >
              >> Hello, vim developers.
              >>
              >> I'm trying to figure out how "jump to tag" function can be improved.
              >> In C# project with multiple overridden virtual methods original Ctrl-]
              >> behaviour is not very useful.
              >>
              >> So, I've reviewed todo.txt file and found the following action item marked
              >> with "8":
              >>
              >> "Use a mechanism similar to omni completion to figure out the kind of tab
              >> for CTRL-] and jump to the appropriate matching tag (if there are
              >> several)."
              >>
              >> Is there a way to find out who is working on this, if any? I'd like to help
              >> to implement
              >> and/or test this functionality.
              >>
              >> Sincerely,
              >> Mikalai
              >
              > I'm not aware of anybody working on it.
              >
              > In my ~/.vimrc, I have the following map...
              >
              > noremap <c-]> g<c-]>
              >
              > ... which helps a bit. When CTRL-] has multiple matches
              > (overloaded functions, derivation...) it will show a list of all
              > matches at let you select the one you want, rather than
              > jumping to the first match.
              >
              > See :help g_CTRL-]

              I do the samething, and when the list is more than 1 page (as it is
              often), it is hard to find the relevant match, so I created a small
              plugin called tagselect to show the output in a new buffer. You can
              then scroll and search like any buffer and press enter to select.

              http://www.vim.org//script.php?script_id=1282

              Note that the plugin executes the :ts command again to enter the
              selected tag number, but because of a vim bug, the command doesn't
              work if executed using :silent, so the list scrolls in front of you,
              but it works.

              --
              Thanks,
              Hari

              >
              > Regards
              > -- Dominique
              >
              > >
              >


              Thank you very much for all the answers. I understand enhancements you propose.

              I'm trying to make it a way to not select tag manually at all (in most cases). I mean,
              C# (in my case) is strongly typed and all ambiguities resolved during compilation,
              before the runtime. Same for "jump to tag" function - it can be aware of the context
              the tag is used and select exact matching declaration. That's why I was interested
              in omni for ctrl-]

              Also I'd need two more major functions: "Find usages" and "Go to base/inheritors".
              I see now that that goes beyond the "omni for tags" function and probably using vim
              scripts will be the best approach to start.


              Mikalai

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_dev" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---

            • Tony Mechelynck
              ... About using cscope (including cscopequickfix and without any nonstandard plugin), I ve put up yesterday a proposed Vim Tip based on my own practice, and
              Message 6 of 6 , Nov 2, 2009
              • 0 Attachment
                On 05/10/09 13:58, Christophe-Marie Duquesne wrote:
                >
                > I don't know who is working on that. But I can give you a tip I use in
                > C++: I use cscope and the cscopequickfix option, which enables me to
                > cycle on virtual methods with :cnext and :cprevious. Using the plugin
                > cscope_map.vim, I think you can tweak your vimrc to get what you want.

                About using cscope (including 'cscopequickfix' and without any
                nonstandard plugin), I've put up yesterday a proposed Vim Tip based on
                my own practice, and covering mostly what I felt was missing in ":help
                if_cscop.txt": http://vim.wikia.com/wiki/Cscope

                It may be more general than what the OP was looking for, of course.


                Best regards,
                Tony.
                --
                Manual, n.:
                A unit of documentation. There are always three or more on a
                given item. One is on the shelf; someone has the others. The
                information you need in in the others.
                -- Ray Simard

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