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

ctags

Expand Messages
  • vipin aravind
    How can I select between tags before jumping to anyone of them rather than going to the first one? thank you
    Message 1 of 12 , Feb 1, 2001
    • 0 Attachment
      How can I select between tags before jumping to anyone of them rather than going to
      the first one?
      thank you                                                                            vipin
    • Johannes Zellner
      ... I ve: map :exec tjump . expand( ) -- Johannes
      Message 2 of 12 , Feb 1, 2001
      • 0 Attachment
        On Thu, Feb 01, 2001 at 03:31:55PM +0530, vipin aravind wrote:
        > How can I select between tags before jumping to anyone of them rather than going to
        > the first one?

        :ts
        :help :ts

        I've:

        map <C-\> :exec "tjump " . expand("<cword>")<CR>


        --
        Johannes
      • Johannes Zellner
        Hi, Having a ctags file w/o the comment part like this: !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ; to lines/ !_TAG_FILE_SORTED 1
        Message 3 of 12 , Aug 21, 2001
        • 0 Attachment
          Hi,

          Having a ctags file w/o the comment part like this:

          !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
          !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted/
          !_TAG_PROGRAM_AUTHOR Darren Hiebert /darren@.../
          !_TAG_PROGRAM_NAME Exuberant Ctags //
          !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
          !_TAG_PROGRAM_VERSION 5.0.1 //
          DebugMsg X-DIO-40.sba /^Private Sub DebugMsg(msg)$/;"
          DialogHandler_XDIO40 X-DIO-40.sba /^Private Function DialogHandler_XDIO40(DlgItem$, Action%, SuppValue%) As Boolean$/;"
          Dialog_XDIO40 X-DIO-40.sba /^Private Sub Dialog_XDIO40 ' [-- SETTING UP THE DIALOG --]$/;"
          HexStrToInt X-DIO-40.sba /^Private Function HexStrToInt(value) As Integer$/;"
          IntToHexStr X-DIO-40.sba /^Private Function IntToHexStr(value, digits) As String$/;"
          Main X-DIO-40.sba /^Sub Main $/;"

          jumping to the tags will put the search pattern into the search
          history (and highlight the pattern, if hls is on).

          If there's something after the comment '"' sign, everything is ok
          and jumping to a tag wil NOT put the search pattern into the search
          history.

          Note: the tags file as above was generated with
          --regex-basic=/pattern/substitution//ei
          ^ no type was specified

          Is this a bug ?

          --
          Johannes
        • Bram Moolenaar
          ... [...] ... [...] ... Vim checks if the command (the third field) is a normal search command. If it isn t the command is executed, if it is Vim does the
          Message 4 of 12 , Aug 21, 2001
          • 0 Attachment
            Johannes Zellner wrote:

            > Having a ctags file w/o the comment part like this:
            [...]
            > DebugMsg X-DIO-40.sba /^Private Sub DebugMsg(msg)$/;"
            [...]
            >
            > jumping to the tags will put the search pattern into the search
            > history (and highlight the pattern, if hls is on).
            >
            > If there's something after the comment '"' sign, everything is ok
            > and jumping to a tag wil NOT put the search pattern into the search
            > history.
            >
            > Note: the tags file as above was generated with
            > --regex-basic=/pattern/substitution//ei
            > ^ no type was specified
            >
            > Is this a bug ?

            Vim checks if the command (the third field) is a normal search command. If it
            isn't the command is executed, if it is Vim does the search in a special way.
            Your tags lines are not recognized as a search command, because they end in
            ;" without a following field. Vim checks for ;"<Tab>.

            Why does your tags file contain trailing ;" without a following tab-separated
            field? The ;" can be omitted then and it would work as expected.

            I could change Vim to recognize ;" without a following <Tab>. I don't see a
            problem with that. Try this patch:

            *** tag.c~ Thu Jul 26 11:03:07 2001
            --- tag.c Tue Aug 21 15:15:04 2001
            ***************
            *** 2280,2304 ****
            if (find_extra(&p) == OK)
            {
            tagp->command_end = p;
            ! p += 3; /* skip ";\"\t" */
            ! while (ASCII_ISALPHA(*p))
            ! {
            ! if (STRNCMP(p, "kind:", 5) == 0)
            ! {
            ! tagp->tagkind = p + 5;
            ! break;
            ! }
            ! pc = vim_strchr(p, ':');
            ! pt = vim_strchr(p, '\t');
            ! if (pc == NULL || (pt != NULL && pc > pt))
            {
            ! tagp->tagkind = p;
            ! break;
            }
            - if (pt == NULL)
            - break;
            - p = pt + 1;
            - }
            }
            if (tagp->tagkind != NULL)
            {
            --- 2280,2305 ----
            if (find_extra(&p) == OK)
            {
            tagp->command_end = p;
            ! p += 2; /* skip ";\"" */
            ! if (*p++ == TAB)
            ! while (ASCII_ISALPHA(*p))
            {
            ! if (STRNCMP(p, "kind:", 5) == 0)
            ! {
            ! tagp->tagkind = p + 5;
            ! break;
            ! }
            ! pc = vim_strchr(p, ':');
            ! pt = vim_strchr(p, '\t');
            ! if (pc == NULL || (pt != NULL && pc > pt))
            ! {
            ! tagp->tagkind = p;
            ! break;
            ! }
            ! if (pt == NULL)
            ! break;
            ! p = pt + 1;
            }
            }
            if (tagp->tagkind != NULL)
            {
            ***************
            *** 2896,2902 ****

            /*
            * Find the end of the tagaddress.
            ! * Return OK if ";\"\t" is following, FAIL otherwise.
            */
            static int
            find_extra(pp)
            --- 2897,2903 ----

            /*
            * Find the end of the tagaddress.
            ! * Return OK if ";\"" is following, FAIL otherwise.
            */
            static int
            find_extra(pp)
            ***************
            *** 2925,2931 ****
            ++str; /* skip ';' */
            }

            ! if (str != NULL && STRNCMP(str, ";\"\t", 3) == 0)
            {
            *pp = str;
            return OK;
            --- 2926,2932 ----
            ++str; /* skip ';' */
            }

            ! if (str != NULL && STRNCMP(str, ";\"", 2) == 0)
            {
            *pp = str;
            return OK;

            --
            hundred-and-one symptoms of being an internet addict:
            54. You start tilting your head sideways to smile.

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
            ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
            \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
          Your message has been successfully submitted and would be delivered to recipients shortly.