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

How to find out when a VimL function was added?

Expand Messages
  • boss@...
    Hello! A user of one of my plugins recently reported this error: `E117: Unknown function: gettabvar`. He also told me the version of Vim he s using. How can I
    Message 1 of 6 , Jan 15, 2014
    • 0 Attachment
      Hello!

      A user of one of my plugins recently reported this error: `E117: Unknown function: gettabvar`. He also told me the version of Vim he's using.

      How can I find out when gettabvar() – or any function in general – was added to VimL?

      Being able to find this out would help me decide whether or not to use a particular VimL function, and/or whether to wrap it in a version-check guard.

      Thanks in advance.

      Yours,
      Andy Stewart

      --
      --
      You received this message from the "vim_dev" 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

      ---
      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Christian Brabandt
      ... I think it was added with version 7.3. See also :help exists() ... (you might also want to grep version7.txt for gettabvar). Best, Christian -- -- You
      Message 2 of 6 , Jan 15, 2014
      • 0 Attachment
        On Wed, January 15, 2014 09:59, boss@... wrote:
        > Hello!
        >
        > A user of one of my plugins recently reported this error: `E117: Unknown
        > function: gettabvar`. He also told me the version of Vim he's using.
        >
        > How can I find out when gettabvar() – or any function in general – was
        > added to VimL?
        >
        > Being able to find this out would help me decide whether or not to use a
        > particular VimL function, and/or whether to wrap it in a version-check
        > guard.
        >

        I think it was added with version 7.3.

        See also :help exists()
        :help version<nr> (e.g. version7.3 version 7.4, etc)
        (you might also want to grep version7.txt for gettabvar).

        Best,
        Christian

        --
        --
        You received this message from the "vim_dev" 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

        ---
        You received this message because you are subscribed to the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Lech Lorens
        ... Easy: have a look at the VSC log. I m using git. Just started gitk and searched for gettabvar() and then scrolled up to find the nearest tag. This can
        Message 3 of 6 , Jan 15, 2014
        • 0 Attachment
          On 15 January 2014 10:13, Christian Brabandt <cblists@...> wrote:
          > On Wed, January 15, 2014 09:59, boss@... wrote:
          >> Hello!
          >>
          >> A user of one of my plugins recently reported this error: `E117: Unknown
          >> function: gettabvar`. He also told me the version of Vim he's using.
          >>
          >> How can I find out when gettabvar() – or any function in general – was
          >> added to VimL?
          >>
          >> Being able to find this out would help me decide whether or not to use a
          >> particular VimL function, and/or whether to wrap it in a version-check
          >> guard.

          Easy: have a look at the VSC log. I'm using git. Just started gitk
          and searched for gettabvar() and then scrolled up to find the nearest
          tag. This can also be done with a little bit of command line magic.

          > I think it was added with version 7.3.

          7.2.438 to be precise.

          Cheers,
          Lech

          --
          --
          You received this message from the "vim_dev" 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

          ---
          You received this message because you are subscribed to the Google Groups "vim_dev" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Andrew Stewart
          ... This works for me: git tag --contains ... Thanks! Yours, Andy Stewart -- -- You received this message from the vim_dev maillist. Do not top-post!
          Message 4 of 6 , Jan 15, 2014
          • 0 Attachment
            On 15 Jan 2014, at 10:17, Lech Lorens <lech.lorens@...> wrote:
            > Easy: have a look at the VSC log. I'm using git. Just started gitk
            > and searched for gettabvar() and then scrolled up to find the nearest
            > tag. This can also be done with a little bit of command line magic.

            This works for me: git tag --contains <sha>

            >> I think it was added with version 7.3.
            >
            > 7.2.438 to be precise.


            Thanks!

            Yours,
            Andy Stewart

            --
            --
            You received this message from the "vim_dev" 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

            ---
            You received this message because you are subscribed to the Google Groups "vim_dev" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • Ingo Karkat
            ... Note that instead of checking for the version in the guard (which usually involves also checking the patch level), it s easier and better to check for the
            Message 5 of 6 , Jan 15, 2014
            • 0 Attachment
              On 15-Jan-2014 09:59 +0100, boss wrote:

              > Hello!
              >
              > A user of one of my plugins recently reported this error: `E117:
              > Unknown function: gettabvar`. He also told me the version of Vim he's
              > using.
              >
              > How can I find out when gettabvar() – or any function in general – was
              > added to VimL?
              >
              > Being able to find this out would help me decide whether or not to use
              > a particular VimL function, and/or whether to wrap it in a
              > version-check guard.

              Note that instead of checking for the version in the guard (which
              usually involves also checking the patch level), it's easier and better
              to check for the existence, in your case via if exists('*gettabvar') ...
              See :h exists().

              -- regards, ingo

              --
              --
              You received this message from the "vim_dev" 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

              ---
              You received this message because you are subscribed to the Google Groups "vim_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Andrew Stewart
              ... Good point, thanks. Yours, Andy Stewart -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you
              Message 6 of 6 , Jan 15, 2014
              • 0 Attachment
                On 15 Jan 2014, at 10:58, Ingo Karkat <swdev@...> wrote:
                > Note that instead of checking for the version in the guard (which
                > usually involves also checking the patch level), it's easier and better
                > to check for the existence, in your case via if exists('*gettabvar') ...
                > See :h exists().


                Good point, thanks.

                Yours,
                Andy Stewart

                --
                --
                You received this message from the "vim_dev" 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

                ---
                You received this message because you are subscribed to the Google Groups "vim_dev" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              Your message has been successfully submitted and would be delivered to recipients shortly.