Sublime Forum

Project per repo

#1

I’m using Sublime 3 (and Tower) on OSX with multiple repos. I’m wondering if it’s possible when opening a file in Sublime for it to open in a corresponding Project per repo? For example, any file from repo1 would open in the repo1 Project. I’ve tried creating a Project withing Sublime and setting the folder within the Project to the directory the repo is located, but choosing a file just opens it in the “default” Sublime window.

0 Likes

#2

I liked the feature you requested and added it to a package named “SideBarFolders” https://github.com/titoBouzout/SideBarFolders that you may install using package control.

As the feature maybe a little intrusive (will move views from one window to another), you need to enable it first, by setting(preferences - packages settings - side bar folders - settings user) the following preference to true

// if a file opening, matches the folder path of other window than current, move the view to that window
{"open_files_in_folder_window": true}

It is slightly different as this does not track or look into projects. It will just look into the window folders, if the file you opening is not under the folders of the current window, then it will look into other windows to see if some of their folders matches the path of the file opening. If so, then it will close the file, and open it in the matched window.

This is the relevant file: https://github.com/titoBouzout/SideBarFolders/blob/master/OpenFilesInFolderWindow.py

0 Likes