Sublime Forum

Multiple project folders with the same path

#1

Hello,

when editing a sublime-project file it seems as though multiple folders with the same path are unsupported. I have a project in which the source files and documentation are both in the same directory, but I would like to break them up into two named folders (“Source” and “Documentation”). The following JSON seems like it should work, but it doesn’t. Instead, the second folder with the same path simply does not show up in the side bar.

[code]{
“folders”:

	{
		"follow_symlinks": true,
		"name": "Source",
		"path": "/Users/jordi/Documents/Arduino/libraries/TLC5947",
		"folder_exclude_patterns": "examples"],
		"file_exclude_patterns": 
		
			"*.txt",
			"*.zip",
			"*.sublime-project"
		]
	},
	{
		"follow_symlinks": true,
		"name": "Examples",
		"path": "/Users/jordi/Documents/Arduino/libraries/TLC5947/examples"
	},
	{
		"follow_symlinks": true,
		"name": "Documentation",
		"path": "/Users/jordi/Documents/Arduino/libraries/TLC5947",
		"folder_exclude_patterns": "examples"],
		"file_exclude_patterns": 
		
			"*.h",
			"*.cpp",
			"*.zip",
			"*.sublime-project"
		]
	}
],
"settings":
{
    "tab_size": 4
}

}[/code]

As you can see, the first and third folders have the same path, yet only the first (“Source”) shows up in the side bar. Any help with this bug would be greatly appreciated as I have many projects that are laid out the same way.

Thanks,
Jordi

0 Likes

#2

Hi Jordi,

A bit too late to this, I am facing the same problem and a work around I found when you have only 2 folders pointing at the same directory is to have the second path pointing a level up and use a folder_include_patterns filter:

e.g. in your example above it would be something like:

{
		"follow_symlinks": true,
		"name": "Documentation",
		"path": "/Users/jordi/Documents/Arduino/libraries",
        "folder_include_patterns: ["TLC5947"],
		"folder_exclude_patterns": [ "examples"],
		"file_exclude_patterns": [
			"*.h",
			"*.cpp",
			"*.zip",
			"*.sublime-project"
		]
}

Hope that works for you

0 Likes