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
You can only get the path of the "first folder" that you opened in the project and the full path to the file in question, but you can not use variables in substitutions (e.g. ${file/$folder//}). It's also restricted to one folder only (i.e. the first one), but that will rarely be a problem.
Example use case: You want to use python -m path.to.module in your project dir instead of executing the file directly.
Solution proposal
Provide $current_folder and $file_relative_to_folder variables. The variables are filled by iterating over all folders in the project and will be set from the first folder that contains the current file.
The resulting build system would then look as follows (hope I got the regex straight):
FichteFoll
changed the title
Provide a build system variables that contain the project folder that the current file is in and the relative path from there
Provide build system variables that contain the project folder that the current file is in and the relative path from there
Aug 17, 2015
Problem
You can only get the path of the "first folder" that you opened in the project and the full path to the file in question, but you can not use variables in substitutions (e.g.
${file/$folder//}
). It's also restricted to one folder only (i.e. the first one), but that will rarely be a problem.Example use case: You want to use
python -m path.to.module
in your project dir instead of executing the file directly.Solution proposal
Provide
$current_folder
and$file_relative_to_folder
variables. The variables are filled by iterating over all folders in the project and will be set from the first folder that contains the current file.The resulting build system would then look as follows (hope I got the regex straight):
Workaround
Something like this:
The text was updated successfully, but these errors were encountered: