-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor Custom Labels: Support negative indices to access start of the file path #209619
Comments
Is the reasoning not the other way round or am I misunderstanding how it currently works? E.g. I'd like to access last 2 parts of the path, but the description of the settings suggests that only the single final and the starting folders can be accessed. |
@Destroy666x, For the following path you will get the following values: Path:
With negative indices:
|
Here is an example of the mono repo: https://github.com/vuejs/core/tree/main/packages Example:
|
Verification steps:
|
I have followed the steps for the verification and the settings file is renamed to Screen.Recording.2024-04-24.at.14.08.48.mov |
Currently, the editor does not support customizing file labels in a way that would allow filenames to be prefixed with the name of the application or folder from the start of the path. This limitation affects projects structured in a monorepo setup, particularly when files are deeply nested within application-specific directories.
Supporting negative indices for
${dirname(N)}
could solve this problem. This would enable accessing folder names starting from the beginning of the path. Implementing negative indices would cater to the needs of projects with files at various nesting levels within their structure.The text was updated successfully, but these errors were encountered: