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

Expanding after a :find command

Expand Messages
  • Ron Aaron
    I just found out about the :find command using path ... very cool and useful! But I cannot find how to use command-line completion for it. For example, if
    Message 1 of 5 , Dec 8, 2004
    • 0 Attachment
      I just found out about the :find command using 'path'... very cool and useful!

      But I cannot find how to use command-line completion for it. For example, if
      I have a 'buffer.c' in my subdirectory 'src', I would like if :

      :find buf<TAB>

      expanded to:

      :find src/buffer.c

      It doesn't do that (or perhaps I don't have the options set to do it). Is it
      possible?


      --
      My GPG public key is at http://ronware.org/
      fingerprint: 8130 734C 69A3 6542 0853 CB42 3ECF 9259 AD29 415D
    • Joe Koenig
      ... Does set wildmenu wildmode=full wildchar= help?
      Message 2 of 5 , Dec 8, 2004
      • 0 Attachment
        Ron Aaron wrote:

        > I have a 'buffer.c' in my subdirectory 'src', I would like if :
        >
        > :find buf<TAB>
        >
        > expanded to:
        >
        > :find src/buffer.c
        >
        > It doesn't do that (or perhaps I don't have the options set to do it). Is
        > it
        > possible?

        Does
        set wildmenu wildmode=full wildchar=<Tab>
        help?
      • Gary Johnson
        ... This is in the To Do List, todo.txt: 7 Command line completion for :find should search in path . 7 means as soon as possible but not necessarily
        Message 3 of 5 , Dec 8, 2004
        • 0 Attachment
          On 2004-12-08, Ron Aaron <ron@...> wrote:
          > I just found out about the :find command using 'path'... very cool and useful!
          >
          > But I cannot find how to use command-line completion for it. For example, if
          > I have a 'buffer.c' in my subdirectory 'src', I would like if :
          >
          > :find buf<TAB>
          >
          > expanded to:
          >
          > :find src/buffer.c
          >
          > It doesn't do that (or perhaps I don't have the options set to do it). Is it
          > possible?

          This is in the To Do List, todo.txt:

          7 Command line completion for ":find" should search in 'path'.

          "7" means "as soon as possible" but not necessarily in the next
          release.

          Gary

          --
          Gary Johnson | Agilent Technologies
          garyjohn@... | Wireless Division
          | Spokane, Washington, USA
        • Ron Aaron
          ... Ah. That s a bit disappointing. Maybe I ll take a look at making it work. -- My GPG public key is at http://ronware.org/ fingerprint: 8130 734C 69A3 6542
          Message 4 of 5 , Dec 9, 2004
          • 0 Attachment
            On Wed, December 8, 2004 14:51, Gary Johnson said:

            > This is in the To Do List, todo.txt:
            >
            > 7 Command line completion for ":find" should search in 'path'.
            >
            > "7" means "as soon as possible" but not necessarily in the next
            > release.

            Ah. That's a bit disappointing. Maybe I'll take a look at making it work.

            --
            My GPG public key is at http://ronware.org/
            fingerprint: 8130 734C 69A3 6542 0853 CB42 3ECF 9259 AD29 415D
          • Hari Krishna Dara
            Just saw your email after my vacation. I have been using the following command as a substitute for missing completion on :find command. Hope you find it
            Message 5 of 5 , Jan 3, 2005
            • 0 Attachment
              Just saw your email after my vacation. I have been using the following
              command as a substitute for missing completion on :find command. Hope
              you find it useful:


              command! -nargs=* -bang -complete=custom,<SID>PathComplete FindInPath
              \ :find<bang> <args>
              function! s:PathComplete(ArgLead, CmdLine, CursorPos)
              return UserFileComplete(a:ArgLead, a:CmdLine, a:CursorPos, 1, &path)
              endfunction


              Put the above in your vimrc and use :FindInPath command instead of
              :find. Of course, you can rename the command to simply :Find, but I
              already use that for running the external GNU find command in my
              greputils.vim plugin. The UserFileComplete() function can be obtained
              from the genutils.vim plugin on vim.sf.net.

              HTH,
              Hari

              On Thu, 9 Dec 2004 at 8:31am, Ron Aaron wrote:

              >
              > On Wed, December 8, 2004 14:51, Gary Johnson said:
              >
              > > This is in the To Do List, todo.txt:
              > >
              > > 7 Command line completion for ":find" should search in 'path'.
              > >
              > > "7" means "as soon as possible" but not necessarily in the next
              > > release.
              >
              > Ah. That's a bit disappointing. Maybe I'll take a look at making it work.
              >
              >



              __________________________________
              Do you Yahoo!?
              Yahoo! Mail - Easier than ever with enhanced search. Learn more.
              http://info.mail.yahoo.com/mail_250
            Your message has been successfully submitted and would be delivered to recipients shortly.