You can clone with
HTTPS or Subversion.
I'm finding a tag which has 3 entries, I choose one and I still get standard :tselect menu.
Looks to be a bug.
Also is there a way to set currently searched string (trying to replace :tj)?
It's not easy to avoid Vim's :tselect menu when using :tjump, since it's the default and the only behavior.
I'm going to need you to provide a test case including the tag names, the filenames corresponding to the tags. Also, the 3 tags files and their relative locations.
What do you mean by "set currently searched string"? Replacing :tjump would be even more complicated than avoiding :tselect.
My scenario in short: there's a folder tags file (which is relative to folder) and file-specific tag file (generated by VIM) which has absolute file path.
To reproduce this issue:
wget https://dl.dropboxusercontent.com/u/185589/ctrlp-tag.tar.bz2 && \
tar jxvf ctrl-tag.tar.bz2 && \
cd ctrl-tag && sh make-tags.sh
open VIM, then:
Choose the one with absolute filename. Kaboom!
By setting currently searched string I mean something smarter than:
call feedkeys("my_tag_here", 't')
The problem with this code is that it is slow. On every character tag is being searched which is redunant, because I have whole tag name.
The feedkeys() is only run once when you're done searching and are jumping to the tag. It's needed for respecting fold options. But what does it have anything to do with replacing :tj? And what do you consider smarter?
:tj / and feedkeys() questions are separate. :tj problem still remains. feedkeys() runs once, but it behaves like I'm typing whole world. This is the code:
let t = taglist(a:tag)
if len(t) <= 1
exec 'tj ' . fnameescape(a:tag)
call feedkeys(a:tag, 'mt')
As you can see I have whole tag already, but passing it to CtrlP with feedkeys() behaves like I'm typing it character by character. So my second question is: can I somehow pass tag to CtrlPTag? Kind of CtrlPTag ?
Oh I see. You can pass whole strings into the prompt with g:ctrlp_default_input.
Awesome! g:ctrl_default_input helped, thank you. Now the only problem left is tags.
It looks like there's no way to get the correct counts for use in :[count]tag. They desync with the counts on the menu as soon as there are 2 duplicates of the same tag in the active buffer. No way to recalculate and Vim doesn't provide any kind of reference.
This means using the :tselect menu in this case is unavoidable, but it's possible to enter the number for this menu automatically.
What about storing number in menu item (that is add(tag, index)) and then use it?
It's already doing that. But as I said, those numbers easily become unusable for :[count]tag.
https://github.com/ivalkeen/vim-ctrlp-tjump - fixed the issue
That still has the desyncing problem, I think.
Use ts-prompt automatically when possible