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

:function documentation

Expand Messages
  • Benoit Cerrina
    Hi, the :help function documentation is not up to date, it states: The name must be made of alphanumeric characters and _ , and must start with a capital.
    Message 1 of 4 , Sep 30 2:42 AM
    • 0 Attachment
      Hi,
      the :help function documentation is not up to date, it states:

      The name must be made of alphanumeric characters and '_', and
      must start with a capital.

      this is no longer true, there is at least the case of function names
      starting
      with s: when they are local to a script.
      By the way are there other case?
      Benoit
      PS:
      I'm opening a bug with exhuberant ctags to have the parsing of function
      starting
      with s: corrected.
    • Bram Moolenaar
      ... This is explained just above that. I ll mention it: Define a new function by the name {name}. The name must be made of alphanumeric characters and _ ,
      Message 2 of 4 , Sep 30 3:00 AM
      • 0 Attachment
        Benoit Cerrina wrote:

        > the :help function documentation is not up to date, it states:
        >
        > The name must be made of alphanumeric characters and '_', and
        > must start with a capital.
        >
        > this is no longer true, there is at least the case of function names
        > starting with s: when they are local to a script.

        This is explained just above that. I'll mention it:

        Define a new function by the name {name}. The name
        must be made of alphanumeric characters and '_', and
        must start with a capital or "s:" (see above).

        > By the way are there other case?

        It's also possible to use <SID> or <SNR>##_, but that's really only for
        use inside mappings.

        > Benoit
        > PS:
        > I'm opening a bug with exhuberant ctags to have the parsing of function
        > starting with s: corrected.

        It should have a facility to mark these functions like "static" in C,
        only valid in the current file.

        --
        hundred-and-one symptoms of being an internet addict:
        61. Your best friends know your e-mail address, but neither your phone number
        nor the address where you live.

        /// 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 ///
      • Benoit Cerrina
        ... From: Bram Moolenaar To: Benoit Cerrina Cc: Sent: Sunday, September 30, 2001 12:00
        Message 3 of 4 , Sep 30 8:22 AM
        • 0 Attachment
          ----- Original Message -----
          From: "Bram Moolenaar" <Bram@...>
          To: "Benoit Cerrina" <benoitcerrina@...>
          Cc: <vim-dev@...>
          Sent: Sunday, September 30, 2001 12:00 PM
          Subject: Re: :function documentation


          >
          > Benoit Cerrina wrote:
          >
          > > the :help function documentation is not up to date, it states:
          > >
          > > The name must be made of alphanumeric characters and '_', and
          > > must start with a capital.
          > >
          > > this is no longer true, there is at least the case of function names
          > > starting with s: when they are local to a script.
          >
          > This is explained just above that. I'll mention it:
          >
          > Define a new function by the name {name}. The name
          > must be made of alphanumeric characters and '_', and
          > must start with a capital or "s:" (see above).
          >
          This is good, the probleme with the previous situation would have been
          that one tends to read what follows and not what precedes after jumping
          to the help for a command


          > > By the way are there other case?
          >
          > It's also possible to use <SID> or <SNR>##_, but that's really only for
          > use inside mappings.
          >

          can it be used when defining a function or just when one is calling a script
          local function
          from a mapping?

          > > Benoit
          > > PS:
          > > I'm opening a bug with exhuberant ctags to have the parsing of function
          > > starting with s: corrected.
          >
          > It should have a facility to mark these functions like "static" in C,
          > only valid in the current file.
          >

          OK I've updated the bug report for ctags.

          Thanks again.

          Benoit
        • Bram Moolenaar
          ... You can use as well. is only for calling an already defined function. Would only use it for debugging though, since you don t know the serial
          Message 4 of 4 , Sep 30 10:29 AM
          • 0 Attachment
            Benoit Cerrina wrote:

            > > > By the way are there other case?
            > >
            > > It's also possible to use <SID> or <SNR>##_, but that's really only for
            > > use inside mappings.
            >
            > can it be used when defining a function or just when one is calling a script
            > local function from a mapping?

            You can use <SID> as well. <SNR> is only for calling an already defined
            function. Would only use it for debugging though, since you don't know
            the serial number until the function has been defined.

            --
            hundred-and-one symptoms of being an internet addict:
            64. The remote to the T.V. is missing...and you don't even care.

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