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

ctags and vim

Expand Messages
  • Kremer Markus (PN-SYS/DSA)
    Hello, is it possible to specify whether to jump to a definition or prototype? ... the prototype of bla and in .c files :ta bla jumps to the definition of
    Message 1 of 4 , Jul 2, 2001
    • 0 Attachment
      Hello,
      is it possible to specify whether to jump to a definition or prototype?
      :ts shows me the information (kind), but in .h files ":ta bla" vim jumps to
      the prototype of bla and in .c files ":ta bla" jumps to the definition of
      bla.

      I would like to have
      <F12> jump to definiton
      <S-F12> jump to prototype

      best regards

      Markus
    • Douglas L Potts
      ... This is really a function of ctags. Vim only uses the output of ctags to jump to the references. Namely, the filepath, and then search for the pattern
      Message 2 of 4 , Jul 2, 2001
      • 0 Attachment
        On Mon, Jul 02, 2001 at 04:03:28PM +0200 Kremer Markus (PN-SYS/DSA) wrote:
        > Hello,
        > is it possible to specify whether to jump to a definition or prototype?
        > :ts shows me the information (kind), but in .h files ":ta bla" vim jumps to
        > the prototype of bla and in .c files ":ta bla" jumps to the definition of
        > bla.
        >
        > I would like to have
        > <F12> jump to definiton
        > <S-F12> jump to prototype
        This is really a function of ctags. Vim only uses the output of ctags
        to jump to the references. Namely, the filepath, and then search for
        the pattern (or possibly the line number).

        Using the ctags flags however, you can choose to include or not include
        prototypes (possibly even to include or not include the function
        definitions, I haven't tried that). This sounds like what you will want
        to do if you only want to jump to the definition tag.

        HTH,
        -Doug

        --
        *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
        Douglas L. Potts Url: http://www.bigfoot.com/~pottsdl
        "They call it paradise, I don't know why. Call someplace paradise, kiss it
        goodbye." - Eagles, Hell Freezes Over, 'The Last Resort'
        *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
      • Hubbell, Sean (GDIS)
        ... From: Hubbell, Sean (GDIS) Sent: Monday, July 02, 2001 10:02 AM To: Douglas L Potts Subject: RE: ctags and vim Cann t you generate a tags file for the
        Message 3 of 4 , Jul 2, 2001
        • 0 Attachment
          -----Original Message-----
          From: Hubbell, Sean (GDIS)
          Sent: Monday, July 02, 2001 10:02 AM
          To: 'Douglas L Potts'
          Subject: RE: ctags and vim


          Cann't you generate a tags file for the prototype and then one for the defs
          then use an nmap to modify the tags variable to point to the right file
          maybe something like:

          nmap <F12> tags=./proto_tags
          nmap <S-F12> tags=./def_tags

          Just a thought.


          Sean

          -----Original Message-----
          From: Douglas L Potts [mailto:potts.13@...]
          Sent: Monday, July 02, 2001 10:44 AM
          To: 'vim@...'
          Subject: Re: ctags and vim


          On Mon, Jul 02, 2001 at 04:03:28PM +0200 Kremer Markus (PN-SYS/DSA) wrote:
          > Hello,
          > is it possible to specify whether to jump to a definition or prototype?
          > :ts shows me the information (kind), but in .h files ":ta bla" vim jumps
          to
          > the prototype of bla and in .c files ":ta bla" jumps to the definition of
          > bla.
          >
          > I would like to have
          > <F12> jump to definiton
          > <S-F12> jump to prototype
          This is really a function of ctags. Vim only uses the output of ctags
          to jump to the references. Namely, the filepath, and then search for
          the pattern (or possibly the line number).

          Using the ctags flags however, you can choose to include or not include
          prototypes (possibly even to include or not include the function
          definitions, I haven't tried that). This sounds like what you will want
          to do if you only want to jump to the definition tag.

          HTH,
          -Doug

          --
          *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
          Douglas L. Potts Url: http://www.bigfoot.com/~pottsdl
          "They call it paradise, I don't know why. Call someplace paradise, kiss it
          goodbye." - Eagles, Hell Freezes Over, 'The Last Resort'
          *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
        • Kremer Markus (PN-SYS/DSA)
          thank you Douglas, that is what i need. Now i create 2 different tag files (one for the definitions and one for prototypes). map map
          Message 4 of 4 , Jul 2, 2001
          • 0 Attachment
            thank you Douglas,
            that is what i need. Now i create 2 different tag files (one for the
            definitions and one for prototypes).
            map <F12> <C-]>
            map <S-F12> <C-]>:tl<CR>
            set tags=.tag_def,.tag_proto
            Now F12 jumps to the definition and shift-F12 jumps to the prototype without
            bothering what i am currently editing.


            bye for now :)

            Markus


            > -----Urspr√ľngliche Nachricht-----
            > Von: Douglas L Potts [SMTP:potts.13@...]
            > Gesendet am: Montag, 2. Juli 2001 16:44
            > An: 'vim@...'
            > Betreff: Re: ctags and vim
            >
            > This is really a function of ctags. Vim only uses the output of ctags
            > to jump to the references. Namely, the filepath, and then search for
            > the pattern (or possibly the line number).
            >
            > Using the ctags flags however, you can choose to include or not include
            > prototypes (possibly even to include or not include the function
            > definitions, I haven't tried that). This sounds like what you will want
            > to do if you only want to jump to the definition tag.
            >
            > HTH,
            > -Doug
            >
            > --
            > *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
            > Douglas L. Potts Url: http://www.bigfoot.com/~pottsdl
            > "They call it paradise, I don't know why. Call someplace paradise, kiss
            > it
            > goodbye." - Eagles, Hell Freezes Over, 'The Last Resort'
            > *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
          Your message has been successfully submitted and would be delivered to recipients shortly.