On 2009-06-02, Edward Peschko wrote:

> On Mon, Jun 1, 2009 at 9:55 PM, John Beckett <[email protected]> wrote:
> >
> > Edward Peschko wrote:
> >> just to clarify - when I say 'tags' I mean ':sts function_name'
> >> splitting the window and pointing to the definition of the
> >> function (as per integration with ctags)
> >>
> >> (If it is easier, perhaps :sts `command` could generate a
> >> list of tags on the fly which could then be displayed in the
> >> minibuffer the same way currently does..
> >
> > To do a full text regex search (mentioned in your first message),
> > just use vimgrep. Or do you mean something else?
> >
> > http://vim.wikia.com/wiki/Find_in_files_within_Vim
> >
> > BTW please bottom post on this list per:
> > http://groups.google.com/group/vim_use/web/vim-information

> John,
> 
> I'm not sure (I'm not all that familiar with vimgrep) but yes, I'm
> pretty sure mean something else..
> 
> I want to preprocess an entire project such that a helper program can
> pick out file/line combinations anywhere they occur in the project.
> Then I want to say:
> 
> :<command> <regular_expression>
> 
> which will then grab each occurrence of these regular expressions,
> generating a set of file/line list from which the user can choose
> (sort of like :sts <function_name>)
> 
> The key difference between vimgrep and this is that:
> 
>     1. you wouldn't need to have all of the files open inside of vim
> (ie: the preprocessing would be in a
>         separate, database format)
>     2. a helper program would be used to generate the file/line list
> of pairs, from which the user would select
>         the one they wanted.
> 
> Number 1 is key - if you have a project that is gigabytes in size, you
> don't want to need to do a fulltext search using vim. Instead, I'd
> like to preprocess the project so that it is easily searchable using
> the helper program in point 2 (and if it is encoded right, saving
> minutes on the search.

So, you want to take all the lines in all the files in your project
and put them into one file, with each line preceded by its file name
and line number?

How do you expect that to be significantly faster than running grep
on the entire project?  I don't mean vimgrep--I wouldn't use that
for this application, either--I mean plain old grep, invoked from
vim's :grep command.

I understand your desire to do this quickly, but your proposed index
file doesn't contain any less information than the original files,
and since you want to perform arbitrary regular-expression searches,
there's no reasonable way I know of to organize that information to
make searches any faster.

If you want to search for symbol definitions, use tags.  If you want
to search of any occurrence of a symbol, use cscope.  If you want to
search for arbitrary strings, use grep.


The convention on this list is to bottom-post, not top-post, as John
already pointed out to you.  Please abide by that convention.

Regards,
Gary



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to