6

Most of the time I use the gd command then I have to browse the file manually in a new terminal tab, because I still need to leave open the previous file.

It would be just a bit useful to be able to open the definition in a new tab, of course, I'm just wondering if this is possible and how to configure it, probably mapping a new command in the nvim config file?

This is how I'm mapping the gd command:

nmap <silent> gd <Plug>(coc-definition)
5
  • Thank you however not sure how to translate the command to what I need, I just updated my answer so you understand how I have it mapped Commented Jun 3, 2021 at 21:10
  • well it opens another "kind of" tab, but it's not a tab, however, it just stays on the file, does not go to the definition Commented Jun 3, 2021 at 21:24
  • What I meant is that it's not the regular terminal tab that opens when I press cmd+t Commented Jun 3, 2021 at 21:33
  • Oh I see - I thought you meant vim tabs. I'll remove these my comments so as not to clutter you post. Good luck with finding a solution! Commented Jun 3, 2021 at 21:36
  • Ho wel I think you were close as well, if I can manage to do what I need using vim tabs that would work as well! Commented Jun 3, 2021 at 21:50

1 Answer 1

7

You shouldn't open in new terminal tab, because this means you'll start a new vim process instance and will launch a new language server process that you use. If you're using some other vim remote plugins, they'll be loaded again.

You can set "coc.preferences.jumpCommand": "tabe" in your coc-settings.json, this will open in vim tabs.

Sign up to request clarification or add additional context in comments.

1 Comment

well at least a workaround that I think will be useful, thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.