Ваши комментарии

So, sorry for bumping such an old topic, but I just remembered this exists, and a few months ago, I randomly thought to try using path": "." instead of "path": "/" to solve my problem with duplicate search results, and what do you know - I succeeded!

Of course, this only works because in our shop, we always keep the .sublime-project file in the project root, and I guess it isn't applicable to people who manage their projects differently, but this way, all of our devs can just clone the repo, and they already have the same folder categorization as others.

Basically, this post was an attempt to avoid http://xkcd.com/979/ in case anyone ever thinks they need to do the same thing!

Good luck,

Miloš

@Dan Dailey


Hi there, I've forgotten all about this thread! Well, in the meantime, I've actually found a better solution, and it involves editing the .sublime-project file. I was using CodeIgniter at the time of writing of this post (and still do for some projects), and I've found the following snippet helps me organize folders a bit better:

{
	"folders":
	[
		{
			"path": "app/controllers",
			"name": "controllers"
		},
		{
			"path": "app/models",
			"name": "models"
		},
		{
			"path": "app/views",
			"name": "views"
		},
		{
			"path": "public/css/src",
			"name": "css"
		},
		{
			"path": "public/js/admin/src",
			"name": "js/admin"
		},
		{
			"path": "public/js/init/src",
			"name": "js/init"
		},
		{
			"path": "/",
			"folder_exclude_patterns": [ "app/controllers", "app/models", "app/views", "public/css/src", "public/js/admin/src", "public/js/init/src" ],
			"name": "/"
		}
	]
}

That's just an example that matches my own folder structure and workflow, and there's only one little problem with it - when using "Find in Files (CTRL+SHIFT+F)", some results turn up twice, e.g. once in the "controllers" path, and once in the "/" path (which I need, so as to be able to access all other stuff that's not covered by the first few defined paths). The "path" definitions are relative to the .sublime-project file - by default, there is only one path set, and it's absolute, but it's completely okay to change it. I always keep my .sublime-project in the root of my project folder, so that works great for me.


The structure defined in the .sublime-project file appears in the "FOLDERS" (the lower) section of the sidebar, rather than "OPEN FILES" (the top one), which I've gotten used to. In the meantime, I've gotten so used to using "CTRL+P" anyway, that I don't really use the sidebar that much to find stuff in my project anymore, but it can be useful to get a glance of where stuff is when you need it.


Hope this helps someone, cheers!



Сервис поддержки клиентов работает на платформе UserEcho