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
TM_DIRECTORY
Ok, finally found it.
${TM_DIRECTORY/^.+\\/(.*)$/$1/} gives the base directory.
${TM_DIRECTORY/^.+\\/(.*)$/$1/}
The part I didn't get was the "double escape" of the directory separator / -> \\/.
/
\\/