how to add a file to favorites?
On the left side of the PhpStorm UI there is something called Favorites. How to add a file to it that does not belong to current project? e.g. I am working on a project, but I need to open other files often, that evidently do not belong to the project. Is it possible at all? Here is what I tried:
- File->Open Directory and I chose the directory containing my favorite file
- Open the directory in the Project window
- Right-click the file and add it to new favorites list named "test"
- File-> Open my regular project directory
- The "test" favourite list is gone. Adding new "test" favourite list adds a new one, not that which I created above.
So, is it possible to add files from outside of the project to Favorites?
If yes, then maybe also another question: is it possible to copy favourite lists between projects? Because I have some really favorites, like e.g. httpd-vhosts.conf from apache directory and I need those files to be accessible in every project and it seems unproductive to add them again and again to every new project.
请先登录再写评论。
Hi there,
Favorites are per project.
To add non-project file to favorites -- just open that file in PhpStorm (e.g. drag & drop from Explorer or whatever you have there) and add to favorites.
You can even add whole folder to favorites.
No (at least I do not know such way). Even worse (from your requirements point of view) -- favorites are part of workspace.xml, which is individual per developer/project (which means -- you can safely put all other files from .idea folder under version control except that file). Therefore you cannot easily copy favorites between projects.
Thanks a lot, I managed to kind of share my favorites between projects by copying the component section you mentioned in the workspace.xml files.