How to use multiple tabs when tagging to a function in Vim

天涯浪子 提交于 2019-11-30 05:00:26
nmap <C-Enter> <C-w><C-]><C-w>T

Does this help ? You could probably figure out something similar for the way back.


Well, we need to decide what would be the wanted behaviour. We can go back to the original tab (not sure how, still investigating) but then the above given mapping is gonna open a new tab next time. So you'll end up with a lot of tabs after a while.

Or we can do <C-w>C, which will close the opened tab and take us back to the original one. I, personally, prefer this way of working (that way I don't lose my position in the file) I go to the function I want, make my corrections there then return to the original file from which I started. Let me know, what would you like (this didn't fit in comments so I put the answer here).

This might point you in the right direction:

http://vim.wikia.com/wiki/Open_every_buffer_in_its_own_tabpage

mikelikespie

So, this is a feature I would like to see as well.

I'm not sure if it's possible.

What I usually do is

:tabnew :tag somepartsoffunction*

and press tab to use globbing to easily find tag.

Sure, it's not an ideal solution, but it works most of the time.

Unfortunately, with VIM tabbing isn't totally integrated since it's a new feature since 7.0. Most people I know that use VIM weren't even aware of tabs until I told them, so with that, I have a feeling there is no way to do it right now.

(I would love to be proven wrong)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!