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

Re: File Finder

Expand Messages
  • Nate-37
    ... I recently stumbled upon two viable candidates. 1) FuzzyFileFinder 2) TSelectFile I m leaning towards TSelectFile, but I have e-mailed FuzzyFileFinder s
    Message 1 of 15 , Oct 1, 2008
    • 0 Attachment
      >As far LookupFile, it has a function similar to what I'm planning
      >(LUWalk) but it has a stupid "genutils" dependency and a ton of
      >functionality I don't need, so I don't think I'm really repeating

      I recently stumbled upon two viable candidates.
      1) FuzzyFileFinder
      2) TSelectFile

      I'm leaning towards TSelectFile, but I have e-mailed FuzzyFileFinder's
      author, and
      he's responded very quickly, and so FuzzyFileFinder appears to be very well
      supported.

      I share your enthusiasm for Textmate's way of doing it, which is simple.

      The common problem with both of these plugins (Fuzzy and TSelect) is that if
      you open
      Vim in a giant folder and use the TSelectInSubdirs or FuzzyFinderFile
      command, you will be
      globbing all those files.

      I need to request that the authors create some kind of g:maxFiles variable.
      However, in looking
      at the plugins' code, it appears that they both use the Vim scripting
      language's "glob" function, which doesn't appear to support some kind of
      max.

      Please share your solution if you find one.

      Thanks,
      --Nate

      someone else's work.

      tmallen wrote:
      >
      >
      > As far LookupFile, it has a function similar to what I'm planning
      > (LUWalk) but it has a stupid "genutils" dependency and a ton of
      > functionality I don't need, so I don't think I'm really repeating
      > someone else's work.
      >
      > On Sep 30, 10:20 am, 703designs <thomasmal...@...> wrote:
      >> Ah, went back and read the second reply about glob(), and this command
      >> is definitely what I need. I think I can write a good plugin that
      >> makes selecting glob() filenames easy. I guess I'll start by breaking
      >> down the returned string and passing in the firt file path to :e.
      >>
      >> On Sep 30, 10:15 am, 703designs <thomasmal...@...> wrote:
      >>
      >> > Oh, here's one simple answer. I can just use :find **/
      >> > whateverpathpattern. I'll write a simple wrapper for the find command
      >> > that always returns **/*query* and map it.
      >>
      >> > I'm not sure how this relates to the earlier glob() example, but
      >> > thanks!
      >>
      >> > Thomas
      >>
      >> > On Sep 30, 10:09 am, "A. S. Budden" <abud...@...> wrote:
      >>
      >> > > 2008/9/30 703designs <thomasmal...@...>:
      >>
      >> > > > Thanks, this is a start. What are you doing with the "let filelist"
      >> > > > part of the first line? Because if I just enter the command
      >> :glob('**/
      >> > > > *css*'), Vim returns the error "Nested *, invalid command." I do
      >> get
      >> > > > the feeling that you're wasting your time helping me, because I
      >> can't
      >> > > > VimScript worth a damn.
      >>
      >> > > The let filelist part assigns the list of files to a variable called
      >> > > "filelist".  If you just want to print the names, you can do
      >>
      >> > > :echo glob('**/*css*')
      >>
      >> > > or:
      >>
      >> > > :let filelist = glob('**/*css*')
      >> > > :echo filelist
      >>
      >> > > :glob is probably running :global rather than glob() - there is a
      >> > > significant difference between functions (e.g. :global) and commands
      >> > > (e.g. glob()).  I'm sure there's a useful help reference for this,
      >> but
      >> > > I couldn't find it in a quick search...
      >>
      >> > > My guess is that :glob('**/*css*') is trying to run an empty command
      >> > > on all lines that match the regular expression '**/*css*', i.e, all
      >> > > lines that have 0 or more single quotes (except with two stars,
      >> > > causing an error), followed by 0 or more forward slashes, the
      >> > > characters 'cs', zero or more 's' characters and then a single
      >> > > quote.... not quite what you had in mind!
      >>
      >> > > Al
      >>
      >>
      > >
      >
      >

      --
      View this message in context: http://www.nabble.com/File-Finder-tp19741842p19756556.html
      Sent from the Vim - General mailing list archive at Nabble.com.


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • toomln
      ... In the next version of tselectfiles, there will be a tselectfiles_limit variable (the max depth). tselectfiles does this globbing only once. In subsequent
      Message 2 of 15 , Oct 1, 2008
      • 0 Attachment
        > I need to request that the authors create some kind of g:maxFiles variable.

        In the next version of tselectfiles, there will be a
        tselectfiles_limit variable (the max depth).

        tselectfiles does this globbing only once. In subsequent uses, the
        cached value is used (unless the command is called with "!"), which
        should be faster.

        In general, I'd suggest to use some kind of manifest/file listing for
        bigger projects. trag[1] can be used to handle that.


        [1] http://www.vim.org/scripts/script.php?script_id=2033

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Nate-37
        ... Very cool! I will check it out as soon as you release it. Thanks, --Nate ... -- View this message in context:
        Message 3 of 15 , Oct 1, 2008
        • 0 Attachment
          >In the next version of tselectfiles, there will be
          > a tselectfiles_limit variable (the max depth).

          Very cool!

          I will check it out as soon as you release it.

          Thanks,
          --Nate

          toomln wrote:
          >
          >
          >> I need to request that the authors create some kind of g:maxFiles
          >> variable.
          >
          > In the next version of tselectfiles, there will be a
          > tselectfiles_limit variable (the max depth).
          >
          > tselectfiles does this globbing only once. In subsequent uses, the
          > cached value is used (unless the command is called with "!"), which
          > should be faster.
          >
          > In general, I'd suggest to use some kind of manifest/file listing for
          > bigger projects. trag[1] can be used to handle that.
          >
          >
          > [1] http://www.vim.org/scripts/script.php?script_id=2033
          >
          > >
          >
          >

          --
          View this message in context: http://www.nabble.com/File-Finder-tp19741842p19764211.html
          Sent from the Vim - General mailing list archive at Nabble.com.


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        Your message has been successfully submitted and would be delivered to recipients shortly.