RE: Using tagselect for help tags [was: Two simple questions with Map]

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

RE: Using tagselect for help tags [was: Two simple questions with Map]

Hari Krishna Dara

On Wed, 8 Jun 2005 at 10:45pm, Eric Arnold wrote:

>
>
> --- Hari Krishna Dara <[hidden email]> wrote:
> [...]
> > May I suggest combining this approach with my tagselect.vim plugin? When
> > there is a large number of matches (such as 133 matches for "z" in my
> > version of vim), you might find it easier to do the below:
> >
> > :h
> > :Tselect /z
> >
> > The above gives all the matching results in a new window in which you
> > can search and select for a particular tag. Here is a tip with this and
> > more information: http://www.vim.org/tips/tip.php?tip_id=937
> >
> > Once selected you can use :tn, :tp or run :Tselect again.
> >
>
> It sounds like a good idea, but doesn't look like it's ready to drop in
> as an adjunct to "help".  I don't have ctags set up, or any tags other
> than what "help" automatically builds.  "tagselect.vim" seems to be
> expecting a tags file in the current directory, as do other tags
> commands.  So, :Tselect  simply complains about no tag for   /z   unless
> I change directory to   $VIM/vim63/doc .

You shouldn't need to have ctags or setup 'tags' specially to be able to
run tag related commands in the help windows. The :helptags command is
equivalent to ctags as it is the one which generates the "tags" files in
all the doc directories under 'runtimepath'. Also, it seems that Vim
automatically ignores the current 'tags' value and computes one from
'rtp', when tag related commands are issued from a help window. In fact,
even the regular :h command needs the same tags even when executed from
a non-help window.

I think the problem in your case was that you didn't run :Tselect from
with in the help window, or there is some other setting that I am not
aware of which has changed in your case.

>
> BTW, is there a way to open the tag's file in another window, leaving
> the :Tselect   window as it was.

I think you are talking about a :Stselect (for :stselect) command. Not
right now, but I needed it myself and have it on the TODO. I will get to
it soon.

>
> I don't know if there is a way to tell Vim about where all tags
> files reside.

According to the help on 'tags', you can have wildcards in filenames, so
if all your tags files are in a /x/y/z directory, then you should be
able to add a path component such as /x/y/z/* or /x/y/z/*.tags
(untested).

--
Thanks,
Hari


               
__________________________________
Discover Yahoo!
Find restaurants, movies, travel and more fun for the weekend. Check it out!
http://discover.yahoo.com/weekend.html 

Reply | Threaded
Open this post in threaded view
|

RE: Using tagselect for help tags [was: Two simple questions with Map]

Hari Krishna Dara

On Thu, 9 Jun 2005 at 10:54am, Hari Krishna Dara wrote:
>
> >
> > BTW, is there a way to open the tag's file in another window, leaving
> > the :Tselect   window as it was.
>
> I think you are talking about a :Stselect (for :stselect) command. Not
> right now, but I needed it myself and have it on the TODO. I will get to
> it soon.

I have now uploaded a new version with :Stselect, :Tjump and :Stjump
commands.

--
Thanks,
Hari


               
__________________________________
Discover Yahoo!
Have fun online with music videos, cool games, IM and more. Check it out!
http://discover.yahoo.com/online.html
Reply | Threaded
Open this post in threaded view
|

tagselect for cscope?

David Fishburn
 
Hari,

Do you know if it is possible to get tagselect to work for cscope lookups?

I use Vim with cscope and the results of a lookup can have a huge number of
results.  So I thought that would be a good fit.  Also, when I see a page of
hits, I would prefer to be able to search through them.

Dave


Reply | Threaded
Open this post in threaded view
|

Re: tagselect for cscope?

Yegappan Lakshmanan
Hi David,

On 6/15/05, David Fishburn <[hidden email]> wrote:
>
> Hari,
>
> Do you know if it is possible to get tagselect to work for cscope lookups?
>
> I use Vim with cscope and the results of a lookup can have a huge number of
> results.  So I thought that would be a good fit.  Also, when I see a page of
> hits, I would prefer to be able to search through them.
>

What about using the cscope quickfix support to browse the results
from a cscope query?

  :help 'cscopequickfix'

- Yegappan
Reply | Threaded
Open this post in threaded view
|

RE: tagselect for cscope?

David Fishburn
 
>
> What about using the cscope quickfix support to browse the
> results from a cscope query?
>
>   :help 'cscopequickfix'
>
> -

Thanks Yegappan.

Missed that option.

I changed my maps to add a :cwindow<CR> at the end of each call.
This will open the quickfix window if there are > 1 matches, else just go
straight to the line.

Works just as I wanted.

Dave