I am trying to get the file current directory in a snippet for visual studio code.
VSCode has a variable: TM_DIRECTORY
, which is the fullpath.
eg:
{folder: "$TM_DIRECTORY"}
would be replaced by
{folder: "/Volumes/my-project-path/ParentFolder/MyFolder"}
But I want only MyFolder
.
Normally, we can use a transform as indicated in the docs. Sublime Text works in the same way. But for as much as I try, the snippet simply outputs the whole regex.
Could someone answer with the magical variable/transform? :)