Projectile is pretty great, but I'm finding it difficult to have it turned on only in places where it would be effective.
As I understand it, the two standard choices are to turn it on manually, as in major mode hooks, or to enable it globally with projectile-global-mode. I find the former not broad enough; I want to be able to access projectile commands while visting any file in a project, regardless of its type. But turning the mode on globally is too broad; it gets turned on even when visiting such manifestly non-project directories as my home directory, /tmp, /etc, etc.
Is there a standard way to activate projectile-mode only when visiting a file that lives in an actual project, as might be determined by, say, checking for the existence of a .git, .svn, etc, directory in some ancestor directory of the current file?
.git,.svn... should be the default. Maybe you have havingprojectile-require-project-rootsetting tonil. – Tu Do Apr 02 '15 at 04:44t. But the mode is still activated in/etcfor example. – Sean Apr 02 '15 at 05:10projectile-find-fileson such non-project directories, Projectile simply gives you a message "You're no on a project". Are you sure you run the right command? – Tu Do Apr 02 '15 at 05:13Projectile[etc]in the mode line when I open/etc. It takes up valuable mode line real estate, and I'd rather just not activate the mode at all in non-project directories. – Sean Apr 02 '15 at 05:29