focus-editor / focus

A simple and fast text editor
GNU General Public License v3.0
1.82k stars 101 forks source link

[Feature Request] Allow switching to a project when you have the projectfile open #360

Open IRooc opened 7 months ago

IRooc commented 7 months ago

Describe the feature THe usecase is you open focus, with Ctrl+O navigate to a folder with a .focus-config file. Open that file and have a command 'Load current project-file' from the commands or something

Additional context Alternate option could be maybe open AND load a .focus-config file if you do ALT+ENTER in the Ctrl+O list?

focus-editor commented 5 months ago

Please can you describe the situation where this functionality is needed, and why this situation is not covered by the existing ways of opening a project?

IRooc commented 5 months ago

Currently I think you can either open a focus project from the command line, or from the projects folder list. If you just open focus and want to open a 'folder' project .focus-config file there is no way to do it. Or am I missing something maybe

focus-editor commented 5 months ago

I see. I'm just trying to understand the circumstances when this is needed first.

The .focus-config files in project dirs were meant for the people who want to launch focus from the command line, so I was wondering why you created a .focus-config file in place rather than a normal project in the global projects directory? Is this because you wanted to commit it to a VCS?

I'm wondering if this would be better solved by remembering projects you've had open and letting you switch to them from the global dialog? I still think it's worth to have this ability because I guess once in a while people will want to do it without going to command line.

Also we're definitely going to need to have an option to open last project on startup.

IRooc commented 5 months ago

Yeah to be fair I've used focus for a while now and the actual need for this has not really been there. I tried this when i learned about the .focus-config files and thought it would be handy. In practice I just quickly create an actual project file...