Allow custom setting/control of workbench tab titles
See original GitHub issueHi there,
In my project, I have files with quite long file names (beyond my control). This limits me to having 3-4 tabs show in my workbench at once. I would like to be able to rename these tabs, or control their label format myself, in order to have more condense tab titles and thus more easily navigate my tabs. This was roughly suggested by #21662 but was not really addressed by #12965 – any of the options for workbench.editor.labelFormat
still give me tab titles that are too long. Can workbench.editor.labelFormat
be modified, for example, to optionally take a formatter lambda function we can provide? As just one example of a reasonable formatter one might write, it could be that you fix tab titles to 20 chars, and for long filenames you truncate and prepend with “…”. Additionally, one might want to assign nickname/shorthand tab titles for commonly used files. Please pardon me if there is already a way to do this (would love to know how!), but if not, I’d sincerely appreciate considering this as a feature request.
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:74
- Comments:44 (2 by maintainers)
Top GitHub Comments
In the hopes that it helps someone else that finds themselves here, there is a setting for allowing tab to auto-shrink if there isn’t enough room:
That was good enough for me.
There is precedent for this (well, for more granular control) in the
window.title
option. It would be great to get an equivalent for tabs!workbench.editor.labelFormat
does seem good enough for the vast majority of use cases though. I’ve got it set to “short” so I always see the current folder name.