You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a lot of snippets for my projects and I often use variables. TM_FILEPATH - it's good, but sometimes project has very long path, something like: /home/user/Documents/work/project1/frontEnd/bestUi/src/component/modal/utils/view.js
My root folder in vsCode is bestUi I don't need to print or use all path, just path from root-folder to file: /bestUi/src/component/modal/utils/view.js,
My proposal is to add new variable, called TM_FILEPATH_RELATIVE, which return, only path from root-folder to file.
If this proposal is being interesting for community, I can implement it, added test for that, add support for multi root-folders and so on,
Just one question, I cannot understand - Where is vsCode saving information about root folder of project?
Thanks a lot for all discussions.
The text was updated successfully, but these errors were encountered:
hello @jrieken I read about Variable Transforms, but I cannot understand how I can implement idea about FILEPATH_RELATIVE
Ok, I can get full path to file and use regexp with hardcoded name of root folder. But what if I load new project (or vscode with multi root). I would need to change my snippet and hardcode new root folder name. And do it every day.
Maybe implement FILEPATH_RELATIVE it's not bad idea.
Thank you for your support and patience.
I have a lot of snippets for my projects and I often use variables.
TM_FILEPATH
- it's good, but sometimes project has very long path, something like:/home/user/Documents/work/project1/frontEnd/bestUi/src/component/modal/utils/view.js
My root folder in vsCode is
bestUi
I don't need to print or use all path, just path from root-folder to file:/bestUi/src/component/modal/utils/view.js
,My proposal is to add new variable, called
TM_FILEPATH_RELATIVE
, which return, only path from root-folder to file.If this proposal is being interesting for community, I can implement it, added test for that, add support for multi root-folders and so on,
Just one question, I cannot understand - Where is vsCode saving information about root folder of project?
Thanks a lot for all discussions.
The text was updated successfully, but these errors were encountered: