FavoriteFiles
FavoriteFiles copied to clipboard
Relative paths in per project favorites
It would be nice to have a possibility to have relative paths in per project favorites. Thus we could copy a *-favs.json
file from one project to another without a need for manually refavoriting all the files.
For example, many of my projects reuse composer.json, package.json, .gitignore located in the same folders with the same relative paths. With such a feature I could simply copy the favorites file from an old project to a new one or even commit the favorites file to a project boilerplate repo.
Let me look into this. I thought I already had relative support, maybe it isn't documented. If not, it makes sense to add it.
Thanks! I was under the same impression but removed the absolute part and FavoriteFiles gave me The following file does not exist
error (with slash or without it).
It's definitely not on by default.
Yeah, apparently paths have to be absolute currently. This sounds like a good idea to have them relative if the file is within the project, but if the file is external to the project, it may make sense to have them absolute.
Re-reading through the docs I wrote, I remember why it doesn't allow relative paths. This was meant to be a general favorites for files outside a project as files in a project are quickly found via the goto panel.
Currently I'm against making the external files outside a project relative to the project. This gets weird when dealing with windows drives or network shares. And generally that requires your project to always be relative to these files. Maybe you control this in your personal environment, but most projects used by people are so heavily dependent on being in a certain place on a system. This would seem like a very niche request.
As for files in a project, they make sense being relative. I guess I can see it being useful if you are grouping files, and then opening favorite groups. This is the only case where I can see an advantage of using FavoriteFiles and relative paths.
So I only want to make internal project files relative, is this what you are looking for? If not, I will probably pass on this feature request.
Thanks for getting into research on that. Basically yes - I would like to have the paths for internal project files (those located next to or in subfolders relative to .sublime-project file) relative. All the others (it might happen that you might need to favorite a file not in the project folder) may probably have absolute paths in the FF config. It would be nice if you could have a relative path leading up (../../file.txt) but as I understand from what you've written that would be undesirable technically. Hopefully it's clear enough. I don't use the "global" favorites with the plugin however I've found project dependent favorites very useful.
Sent from my iPhone
On 30 May 2017, at 17:01, Isaac Muse [email protected] wrote:
Re-reading through the docs I wrote, I remember why it doesn't allow relative paths. This was meant to be a general favorites for files outside a project as files in a project are quickly found via the goto panel.
Currently I'm against making the external files outside a project relative to the project. This gets weird when dealing with windows drives or network shares. And generally that requires your project to always be relative to these files. Maybe you control this in your personal environment, but most projects used by people are so heavily dependent on being in a certain place on a system. This would seem like a very niche request.
As for files in a project, they make sense being relative. I guess I can see it being useful if you are grouping files, and then opening favorite groups. This is the only case where I can see an advantage of using FavoriteFiles and relative paths.
So I only want to make internal project files relative, is this what you are looking for? If not, I will probably pass on this feature request.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.