RFC: Indexing help files[was: Re: which vim option]

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

RFC: Indexing help files[was: Re: which vim option]

Eddy Petrișor
On 4/16/06, Yakov Lerner <[hidden email]> wrote:
> I remember I used this vim option in the past but now I can't find its name.

I have this problem frequently, with different options.

My question is: how hard would it be to add an index for help topics
so one could say something like:

:indexsearch <keyword list>

which should return a list of all topics that contain the keywords in
the <keyword list>


Of course, the list should be updated from time to time...

--
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
Reply | Threaded
Open this post in threaded view
|

Re: RFC: Indexing help files[was: Re: which vim option]

Eric Arnold-3
Well, it doesn't restrict itself to keywords, but

:helpgrep

plus

:copen

almost always does the trick for me, and returning stuff from a wider
search is usually instructive.




On 4/16/06, Eddy Petrişor <[hidden email]> wrote:

> On 4/16/06, Yakov Lerner <[hidden email]> wrote:
> > I remember I used this vim option in the past but now I can't find its name.
>
> I have this problem frequently, with different options.
>
> My question is: how hard would it be to add an index for help topics
> so one could say something like:
>
> :indexsearch <keyword list>
>
> which should return a list of all topics that contain the keywords in
> the <keyword list>
>
>
> Of course, the list should be updated from time to time...
>
> --
> Regards,
> EddyP
> =============================================
> "Imagination is more important than knowledge" A.Einstein
>
Reply | Threaded
Open this post in threaded view
|

Re: RFC: Indexing help files[was: Re: which vim option]

iler.ml
> On 4/16/06, Eddy Petrişor <[hidden email]> wrote:
> > My question is: how hard would it be to add an index for help topics
> > so one could say something like:
> >
> > :indexsearch <keyword list>

Help topics *are* indexed, Eddy. If you do
     :he window
and press <Tab>, you'll get list of topics (help tags)
containing "window". That provided you have these setting:
    set wildmode=list:longest
    set wildmenu
In addition yuou can use :helpgrep as Eric mentioned.

Yakov
Reply | Threaded
Open this post in threaded view
|

Re: RFC: Indexing help files[was: Re: which vim option]

Eric Arnold-3
Line 31 of

:help

reads

  Search for help:  Type ":help word", then hit CTRL-D to see matching
                    help entries for "word".

I think that in addition it should also be at  :help  line 1,  the
default  statusline  string, and the default ":" prompt until  ^D  is
used at least once  :-)

It's the best part of the help system, and the best kept secret in plain view.




On 4/16/06, Yakov Lerner <[hidden email]> wrote:

> > On 4/16/06, Eddy Petrişor <[hidden email]> wrote:
> > > My question is: how hard would it be to add an index for help topics
> > > so one could say something like:
> > >
> > > :indexsearch <keyword list>
>
> Help topics *are* indexed, Eddy. If you do
>      :he window
> and press <Tab>, you'll get list of topics (help tags)
> containing "window". That provided you have these setting:
>     set wildmode=list:longest
>     set wildmenu
> In addition yuou can use :helpgrep as Eric mentioned.
>
> Yakov
>
Reply | Threaded
Open this post in threaded view
|

Re: RFC: Indexing help files[was: Re: which vim option]

Eddy Petrișor
On 4/16/06, Eric Arnold <[hidden email]> wrote:
>
>   Search for help:  Type ":help word", then hit CTRL-D to see matching
>                     help entries for "word".

> On 4/16/06, Yakov Lerner <[hidden email]> wrote:
> > > On 4/16/06, Eddy Petrişor <[hidden email]> wrote:
> > > > My question is: how hard would it be to add an index for help topics
> > > > so one could say something like:
> > > >
> > > > :indexsearch <keyword list>
> >
> > Help topics *are* indexed, Eddy. If you do
> >      :he window
> > and press <Tab>, you'll get list of topics (help tags)

I was refering to the contents, not only the topics, because as long
as you don't know what is the name of the topic, one will not be able
to find a topic as long as he/she does not know the name of the topic;
Is kind of chicken and egg issue.

> > containing "window". That provided you have these setting:
> >     set wildmode=list:longest
> >     set wildmenu
> > In addition yuou can use :helpgrep as Eric mentioned.
> >
> > Yakov

AFAICS, none of these issues do what I was referring to.

--
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
Reply | Threaded
Open this post in threaded view
|

Re: RFC: Indexing help files[was: Re: which vim option]

Eric Arnold

It's a bit confusing what you are looking for.  You originally asked for an
index of keywords, but here you're asking for contents.  Both are indexed,
either through the :help ^D or :help <TAB>, or virtually via regexp and
"helpgrep".

If "helpgrep" doesn't find it, then it isn't part of the help system, since it
does a regexp through everything regardless of structure.  Of course, if you're
unsure as to what to "grep" for, then you are stuck with reading the doc.s via
the various tables of contents links until you have enough working knowledge to
begin searching for related items.



--- Eddy Petrişor <[hidden email]> wrote:

> On 4/16/06, Eric Arnold <[hidden email]> wrote:
> >
> >   Search for help:  Type ":help word", then hit CTRL-D to see matching
> >                     help entries for "word".
>
> > On 4/16/06, Yakov Lerner <[hidden email]> wrote:
> > > > On 4/16/06, Eddy Petrişor <[hidden email]> wrote:
> > > > > My question is: how hard would it be to add an index for help topics
> > > > > so one could say something like:
> > > > >
> > > > > :indexsearch <keyword list>
> > >
> > > Help topics *are* indexed, Eddy. If you do
> > >      :he window
> > > and press <Tab>, you'll get list of topics (help tags)
>
> I was refering to the contents, not only the topics, because as long
> as you don't know what is the name of the topic, one will not be able
> to find a topic as long as he/she does not know the name of the topic;
> Is kind of chicken and egg issue.
>
> > > containing "window". That provided you have these setting:
> > >     set wildmode=list:longest
> > >     set wildmenu
> > > In addition yuou can use :helpgrep as Eric mentioned.
> > >
> > > Yakov
>
> AFAICS, none of these issues do what I was referring to.
>
> --
> Regards,
> EddyP
> =============================================
> "Imagination is more important than knowledge" A.Einstein
>

Reply | Threaded
Open this post in threaded view
|

Re: RFC: Indexing help files[was: Re: which vim option]

Eddy Petrișor
On 4/17/06, Eric Arnold <[hidden email]> wrote:
>
> It's a bit confusing what you are looking for.  You originally asked for an
> index of keywords, but here you're asking for contents.  Both are indexed,
> either through the :help ^D or :help <TAB>, or virtually via regexp and
> "helpgrep".

I agree i mght have not been clear, but I said:

":indexsearch <keyword list>

which should return a list of all topics that contain the keywords in
the <keyword list>"

> If "helpgrep" doesn't find it, then it isn't part of the help system, since it

:helpgrep white space

will bring me to the first place where that regexp is found, but 1)
that is not a list of topics and 2) how do I pass to the next place
where that matches?

(after :he helpgrep) oh, that's it :cwindow

(Again, thinking that vim is cool, but many useful things are not
obvious at all).

--
Regards,
EddyP
=============================================
"Imagination is more important than knowledge" A.Einstein
Reply | Threaded
Open this post in threaded view
|

Re: RFC: Indexing help files[was: Re: which vim option]

iler.ml
On 4/17/06, Eddy Petrişor <[hidden email]> wrote:

> On 4/17/06, Eric Arnold <[hidden email]> wrote:
> >
> > It's a bit confusing what you are looking for.  You originally asked for an
> > index of keywords, but here you're asking for contents.  Both are indexed,
> > either through the :help ^D or :help <TAB>, or virtually via regexp and
> > "helpgrep".
>
> I agree i mght have not been clear, but I said:
>
> ":indexsearch <keyword list>
>
> which should return a list of all topics that contain the keywords in
> the <keyword list>"
>
> > If "helpgrep" doesn't find it, then it isn't part of the help system, since it
>
> :helpgrep white space
>
> will bring me to the first place where that regexp is found, but 1)
> that is not a list of topics and 2) how do I pass to the next place
> where that matches?

You go to the next/prev place using
            :cn              " goto next helpgrep match
            :cp              " go to prev helpgrep match
commands. I my vimrc, I have them mapped to F8 and F7:
    map <F7> :cp<cr>
    map <F8> :cn<cr>

Yakov
Reply | Threaded
Open this post in threaded view
|

RE: RFC: Indexing help files[was: Re: which vim option]

Suresh Govindachar`
 
   Yakov Lerner wrote:
  >On 4/17/06, Eddy Petrisor <[hidden email]> wrote:
  >> On 4/17/06, Eric Arnold <[hidden email]> wrote:
  >> >
  >> > It's a bit confusing what you are looking for.  You
  >> > originally asked for an index of keywords, but here you're
  >> > asking for contents.  Both are indexed, either through the
  >> > :help ^D or :help <TAB>, or virtually via regexp and
  >> > "helpgrep".
  >>
  >> I agree i mght have not been clear, but I said:
  >>
  >> ":indexsearch <keyword list>
  >>
  >> which should return a list of all topics that contain the
  >> keywords in the <keyword list>"
  >>
  >> > If "helpgrep" doesn't find it, then it isn't part of the help
  >> > system, since it
  >>
  >> :helpgrep white space
  >>
  >> will bring me to the first place where that regexp is found,
  >> but 1) that is not a list of topics and 2) how do I pass to the
  >> next place where that matches?
  >
  > You go to the next/prev place using
  >             :cn              " goto next helpgrep match
  >             :cp              " go to prev helpgrep match
  > commands. I my vimrc, I have them mapped to F8 and F7:
  >     map <F7> :cp<cr>
  >     map <F8> :cn<cr>

  Also try :copen

  --Suresh

Reply | Threaded
Open this post in threaded view
|

Re: RFC: Indexing help files[was: Re: which vim option]

Eric Arnold-3
In reply to this post by Eddy Petrișor
Remember that the regexp can be given as:

:helpgrep \(keyword1\|keyword2\)

or

:helpgrep \(.*keyword1\&.*keyword2\)

if you need more complex list searches.