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

Completing functions with # in the name

Expand Messages
  • skeept
    Hi all, is there a setting that I can use that will allow me to complete a function with # in the name? The current situation is as follows: Suppose I want to
    Message 1 of 7 , Apr 24, 2014
    • 0 Attachment
      Hi all,

      is there a setting that I can use that will allow me to complete a function with # in the name?

      The current situation is as follows:
      Suppose I want to call a function called unite#custom#alias()
      If I type

      :call unite

      and hit <tab> multiple times then eventually matching completions will cycle until it matches the function I am looking for.

      But if I type

      :call unite#

      and hit <tab> the completions offered are in my case Agrep_Path AlternateFile, ... which would be the completions offered if I didn't had specified anything.


      Thanks for any hints.
      Jorge

      --
      --
      You received this message from the "vim_use" 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_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • Chris Allison
      Hi skeept, what version are you using, as with my version it works as expected ... not at the beginning of the list as in your case. chris@druida: ~ $ vim
      Message 2 of 7 , Apr 25, 2014
      • 0 Attachment
        Hi skeept,

        what version are you using, as with my version it works as expected

        :call unite# <TAB> will complete with functions that start unite# and
        not at the beginning of the list as in your case.

        chris@druida: ~ $ vim --version
        VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 24 2014 19:35:25)
        Included patches: 1-214
        Compiled by Arch Linux

        regards

        Chris

        On 24 April 2014 19:31, skeept <skeept@...> wrote:
        > Hi all,
        >
        > is there a setting that I can use that will allow me to complete a function with # in the name?
        >
        > The current situation is as follows:
        > Suppose I want to call a function called unite#custom#alias()
        > If I type
        >
        > :call unite
        >
        > and hit <tab> multiple times then eventually matching completions will cycle until it matches the function I am looking for.
        >
        > But if I type
        >
        > :call unite#
        >
        > and hit <tab> the completions offered are in my case Agrep_Path AlternateFile, ... which would be the completions offered if I didn't had specified anything.
        >
        >
        > Thanks for any hints.
        > Jorge
        >
        > --
        > --
        > You received this message from the "vim_use" 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_use" group.
        > To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        > For more options, visit https://groups.google.com/d/optout.



        --
        _ o , ,
        / | | |_| / \_/ \_| |
        \__/ \/ \/ |/ \/ \/ \/|/
        (|

        --
        --
        You received this message from the "vim_use" 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_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      • skeept
        ... Hi Chris, my current vim version is 7.4.265, compiled this morning. I can reproduce the behavior I mentioned with a very minimal setting: #############
        Message 3 of 7 , Apr 25, 2014
        • 0 Attachment
          >
          > what version are you using, as with my version it works as expected
          >
          >
          >
          > :call unite# <TAB> will complete with functions that start unite# and
          >
          > not at the beginning of the list as in your case.
          >

          Hi Chris,

          my current vim version is 7.4.265, compiled this morning.
          I can reproduce the behavior I mentioned with a very minimal setting:

          ############# test.vim#############
          set nocompatible
          set runtimepath+=~/vimfiles/bundle/unite
          ###################################


          vim -u test.vim

          Does it work fine for you with this minimal setting?

          Thanks,
          Jorge.

          --
          --
          You received this message from the "vim_use" 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_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/d/optout.
        • Nikolay Pavlov
          On Apr 25, 2014 11:21 AM, Chris Allison ... Try doing ... before completing (this will reset iskeyword and isident options
          Message 4 of 7 , Apr 25, 2014
          • 0 Attachment


            On Apr 25, 2014 11:21 AM, "Chris Allison" <chris.charles.allison@...> wrote:
            >
            > Hi skeept,
            >
            > what version are you using, as with my version it works as expected

            Try doing

                :set iskeyword&vim isident&vim
            before completing (this will reset iskeyword and isident options to the default for vim).

            >
            > :call unite# <TAB> will complete with functions that start unite# and
            > not at the beginning of the list as in your case.
            >
            > chris@druida: ~ $ vim --version
            > VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 24 2014 19:35:25)
            > Included patches: 1-214
            > Compiled by Arch Linux
            >
            > regards
            >
            > Chris
            >
            > On 24 April 2014 19:31, skeept <skeept@...> wrote:
            > > Hi all,
            > >
            > > is there a setting that I can use that will allow me to complete a function with # in the name?
            > >
            > > The current situation is as follows:
            > > Suppose I want to call a function called unite#custom#alias()
            > > If I type
            > >
            > > :call unite
            > >
            > > and hit <tab> multiple times then eventually matching completions will cycle until it matches the function I am looking for.
            > >
            > > But if I type
            > >
            > > :call unite#
            > >
            > > and hit <tab> the completions offered are in my case Agrep_Path AlternateFile, ... which would be the completions offered if I didn't had specified anything.
            > >
            > >
            > > Thanks for any hints.
            > > Jorge
            > >
            > > --
            > > --
            > > You received this message from the "vim_use" 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_use" group.
            > > To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            > > For more options, visit https://groups.google.com/d/optout.
            >
            >
            >
            > --
            >  _          o  ,   ,
            > /   |  |  |_| / \_/ \_|  |
            > \__/ \/ \/  |/ \/  \/  \/|/
            >                         (|
            >
            > --
            > --
            > You received this message from the "vim_use" 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_use" group.
            > To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            > For more options, visit https://groups.google.com/d/optout.

            --
            --
            You received this message from the "vim_use" 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_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/d/optout.
          • Vlad Irnov
            ... I always had this problem. I assumed it was a bug. It can be annoying when developing autoload functions. Doing ... does not help. This can be tested with
            Message 5 of 7 , Apr 28, 2014
            • 0 Attachment
              On 4/25/14, Nikolay Pavlov <zyx.vim@...> wrote:
              > On Apr 25, 2014 11:21 AM, "Chris Allison" <chris.charles.allison@...>
              > wrote:
              >>
              >> Hi skeept,
              >>
              >> what version are you using, as with my version it works as expected
              >
              > Try doing
              >
              > :set iskeyword&vim isident&vim
              > before completing (this will reset iskeyword and isident options to the
              > default for vim).
              >
              >>
              >> :call unite# <TAB> will complete with functions that start unite# and
              >> not at the beginning of the list as in your case.
              >>

              I always had this problem. I assumed it was a bug. It can be annoying
              when developing autoload functions.

              Doing
              :set iskeyword&vim isident&vim
              does not help.

              This can be tested with any autoload plugin, such as netrw. First
              activate it with :Exp or :Sexp.
              When I do
              :call netrw<TAB>
              I get a bunch of functions as expected, first one is netrw#ErrorMsg().
              But completion fails afer typing #. This finds nothing:
              :call netrw#E<TAB>

              Currently using Vim 7.4.179, Windows.

              Possibly related issue on the todo list:
              If the variable "g:x#y#z" exists completion after ":echo g:x#" doesn't work.

              Best regards,
              Vlad

              --
              --
              You received this message from the "vim_use" 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_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/d/optout.
            • Nikolay Pavlov
              ... chris.charles.allison@gmail.com ... Check out what I replied to: it should not *help* it should make completion *no longer work* for a person who says it
              Message 6 of 7 , Apr 28, 2014
              • 0 Attachment


                On Apr 29, 2014 7:13 AM, "Vlad Irnov" <vlad.irnov@...> wrote:
                >
                > On 4/25/14, Nikolay Pavlov <zyx.vim@...> wrote:
                > > On Apr 25, 2014 11:21 AM, "Chris Allison" <chris.charles.allison@...>
                > > wrote:
                > >>
                > >> Hi skeept,
                > >>
                > >> what version are you using, as with my version it works as expected
                > >
                > > Try doing
                > >
                > >     :set iskeyword&vim isident&vim
                > > before completing (this will reset iskeyword and isident options to the
                > > default for vim).
                > >
                > >>
                > >> :call unite# <TAB> will complete with functions that start unite# and
                > >> not at the beginning of the list as in your case.
                > >>
                >
                > I always had this problem. I assumed it was a bug. It can be annoying
                > when developing autoload functions.
                >
                > Doing
                >     :set iskeyword&vim isident&vim
                > does not help.

                Check out what I replied to: it should not *help* it should make completion *no longer work* for a person who says it does work.

                >
                > This can be tested with any autoload plugin, such as netrw. First
                > activate it with :Exp or :Sexp.
                > When I do
                >     :call netrw<TAB>
                > I get a bunch of functions as expected, first one is netrw#ErrorMsg().
                > But completion fails afer typing #. This finds nothing:
                >     :call netrw#E<TAB>
                >
                > Currently using Vim 7.4.179, Windows.
                >
                > Possibly related issue on the todo list:
                > If the variable "g:x#y#z" exists completion after ":echo g:x#" doesn't work.
                >
                > Best regards,
                > Vlad
                >
                > --
                > --
                > You received this message from the "vim_use" 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_use" group.
                > To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                > For more options, visit https://groups.google.com/d/optout.

                --
                --
                You received this message from the "vim_use" 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_use" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                For more options, visit https://groups.google.com/d/optout.
              • Vlad Irnov
                ... OK, I get it. But changing iskeyword and/or isident does not help either. I tried ... and even crazy ... without success. Still no command line
                Message 7 of 7 , Apr 29, 2014
                • 0 Attachment
                  On 4/28/14, Nikolay Pavlov <zyx.vim@...> wrote:
                  > On Apr 29, 2014 7:13 AM, "Vlad Irnov" <vlad.irnov@...> wrote:
                  >>
                  >> On 4/25/14, Nikolay Pavlov <zyx.vim@...> wrote:
                  >> > On Apr 25, 2014 11:21 AM, "Chris Allison" <
                  > chris.charles.allison@...>
                  >> > wrote:
                  >> >>
                  >> >> Hi skeept,
                  >> >>
                  >> >> what version are you using, as with my version it works as expected
                  >> >
                  >> > Try doing
                  >> >
                  >> > :set iskeyword&vim isident&vim
                  >> > before completing (this will reset iskeyword and isident options to the
                  >> > default for vim).
                  >> >
                  >> >>
                  >> >> :call unite# <TAB> will complete with functions that start unite# and
                  >> >> not at the beginning of the list as in your case.
                  >> >>
                  >>
                  >> I always had this problem. I assumed it was a bug. It can be annoying
                  >> when developing autoload functions.
                  >>
                  >> Doing
                  >> :set iskeyword&vim isident&vim
                  >> does not help.
                  >
                  > Check out what I replied to: it should not *help* it should make completion
                  > *no longer work* for a person who says it does work.

                  OK, I get it. But changing 'iskeyword' and/or 'isident' does not help
                  either. I tried
                  :set iskeyword+=# isident+=#
                  and even crazy
                  :set isk=1-255 isi=1-255 isf=1-255
                  without success. Still no command line completion for autoloaded
                  functions afer #, for example
                  :call netrw#E<Tab>

                  Best regards,
                  Vlad

                  --
                  --
                  You received this message from the "vim_use" 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_use" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
                  For more options, visit https://groups.google.com/d/optout.
                Your message has been successfully submitted and would be delivered to recipients shortly.