I'm currently writing a plugin for Sublime Text 3, which aims to offer the user a more flexible session management.
As it seems the API doesn't offer a way to open a .sublime-project file. I'm obviously able to open files as usual - using window.open_file - but not to tell Sublime to open a specific project file.
It will just open it in a new tab, which isn't exactly what I was hoping for.
I'm able to access and set the project_data using window.project_data and window.set_project_data, but while there is a window.project_file_name method it has no counterpart.
This is problematic since the project_data often contains relative paths, which need to be interpreted relative to the .sublime-project files location. If I just dump the data as found into a new window (set_project_data), all relative paths will be interpreted as relative to root (at least on my Ubuntu system).
I can handle the relative paths myself and modify the project_data accordingly but that's hacky.
Is there any undocumented method or something I missed?
EDIT: The plugin in question.
Try to open the file with suffix ':1' - meaning 'line number #1': This works for me:
$ subl projectname.sublime-project:1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With