In vscode v1.88 ( Release Notes: custom editor names):
Custom labels for open editors
We now offer the ability to customize editor labels for the tab bar
and the open editors view. You can tailor these labels to your
preference by adding entries under the
workbench.editor.customLabels.patterns
setting. Each entry should
include a glob
pattern that
matches file paths and a template that defines the new name for the
editor tab. This customization only applies when a file's path matches
the specified pattern. Whether a pattern matches depends on if it's
defined as a relative or absolute file path pattern.
Templates can incorporate variables such as ${filename}
,
${extname}
, ${dirname}
, and ${dirname(N)}
, which are dynamically
replaced with values from the file's path.
To enable or disable the application of these custom labels, use the
workbench.editor.customLabels.enabled
setting. This allows you to
view the original editor names at any time without needing to remove
your custom patterns.
You will be able to change your tab names to something like /parentFolder index
using this value:
\${dirname} {filename}
in the setting:
Workbench > Editor > CustomLabels : Patterns
(setting ID workbench.editor.customLabels.patterns
)
See more at Provide api to access and change editor tab labels
“window.title”: “${activeEditorLong}${separator}${rootName}”
${activeEditorMedium}${separator}${rootName}
works even better imo, I don't see a reason to see the entire path of the file as opposed to path from src root