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'm trying to use this plugin as a way to create different "projects" within a project.
I just need to folder/file templating structure to create different folder blocks but I can't find a way to pass the current opened project path into the default_project_path argument.
how can I do that?
The text was updated successfully, but these errors were encountered:
ok for anyone else looking to try to do this. spent an afternoon trying to understand how sublime plugins work, dissecting a bunch of other plugins, a lot of trial and error.
for the default_project_path_setting = settings.get('default_project_path') line in projectmaker.py
change it to
window = sublime.active_window()
project_folders = window.folders()
project_data = window.project_data()
if project_data is not None:
default_project_path_setting = project_data["folders"][0]["path"]
else:
default_project_path_setting = settings.get('default_project_path')
and it'll pull the path of the first folder in your project window as the path of the new project template you are creating.
on a side note. how can I debug these plugins in a better way? I was basically just randomly trying variables, trying to run the plugin, if it broke/didn't work I would try another variable until something worked.
I'm trying to use this plugin as a way to create different "projects" within a project.
I just need to folder/file templating structure to create different folder blocks but I can't find a way to pass the current opened project path into the default_project_path argument.
how can I do that?
The text was updated successfully, but these errors were encountered: