Closed esman closed 4 years ago
I see this:
noremap \<Leader>rT :call rtags#JumpTo(g:NEW_TAB)
Several people have added some maps and updated things in pull requests and/or their own forks of vim-rtags.
Indeed, rtags#JumpTo(g:NEW_TAB) opens a new tab, but it does so even if the symbol is at the same (currently opened) source file. So you'll end up with two tabs with the same file opened.
ok, sorry I didn't get that detail in your original question - you only want a new tab if the symbol is in a different file. I think one could modify the mapping or add a new mapping for that. Would have to experiment some to figure it out.
I added some code to my fork of vim-rtags for this. So now \<Leader>rT will only create a new tab if the symbol is in a different file than the current buffer. \<Leader>rt still always opens a new tab. You can check it out if you like, I have not tested it much.
@esman fyi, I just updated my vim-rtags repo again with one more change after some more testing.
I changed my fork again just now, so rT is new tab if different file and rt is new tab always - but if same file then its a tab split instead of a tab new. So thanks for suggesting this, it made for some nice updates :-)
@mckellyln Thank you a lot. Your changes really work for the case!
I think I should try to dive into a syntax and provide PR to this repo also.
@esman you are welcome. Let me know if you have any problems or suggestions. I hadn't looked at this in a while and I am glad I did because of your note - and then I found and fixed a few more little things. Several others have submitted PRs but I think it's been a while since any were reviewed/merged? Which is why I created a fork and updated it and cherry-picked some other great fixes/features from others' PRs over time.
Hi, thanks for the great plugin I'm using on a daily basis!
Is it possible to 'follow' a symbol and open it in a new tab only in case it would be a different source file?
Thanks!