Tab pages don't have names so there is simply no way to switch to a specific tab page by… its name.
The label in the tab widget is the name of the buffer displayed in the focused window in the corresponding tab page. Thus, it could be anything from foo.txt
to [No Name]
via [Quickfix List]
or p/a/t/t/h/to/bar.js
, none of which would be of any use. Even foo.txt
would not be that useful because of the very nature of buffers which can be displayed in any number of windows in any number of tab pages.
See :help tab-page
.
There is a very limited solution, though: :sbuffer
is the only "buffer" command that respects the 'switchbuf'
option and allows you to switch to a specific buffer where it is displayed instead of in the current window.
:set switchbuf=useopen,usetab
:sb foo.txt
See :help 'switchbuf'
and :help :sb
.
Anyway, it seems that you are using tab pages as file proxies. This is very bad idea: buffers are the real thing.