Sublime Forum

Artificial Subfolders in Side Bar

#1

I know that I can add/hide/rename folders to a project by editing the folder part of the .sublime-project file. Is there a way to “merge” them in a parent folder that is displayed only in the Side Bar?

For example, this below will include the two folders UT_R and UT_V as two separate folders in the Side Bar

“folders”:
[
{“name”: “UT Repeatable”, “path”: “SQLs/UT_R”},
{“name”: “UT Versioned”, “path”: “SQLs/UT_V”}
],

But that adds two entries to the Side Bar. Is it possible to make them appear as Repeatable and Versioned under UT without rearranging the actual folders in the file system? What I’ve tried and know that doesn’t work is adding a slash to the name:

“folders”:
[
{“name”: “UT/Repeatable”, “path”: “SQLs/UT_R”},
{“name”: “UT/Versioned”, “path”: “SQLs/UT_V”}
],

That simply adds those slashes to the names.

0 Likes

#2

The structure of folders in the side bar always mimics that of the underlying file system. The only exceptions to that are being able to hide files and folders from appearing or changing the name of the top level added folder to something else.

As such, what you want to do here would indeed require that the physical structure of the files on disk be different. However, it’s possible to symkink (or on Windows, junction) a folder from one location into another.

So, you could create a folder somewhere else, symlink the two folders you want inside of it, then open that temporary folder and it would appear as if the other two are inside of it. That might do what you want.

0 Likes