focus-editor / focus

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

Implemented command to open a new focus window #319

Closed LainLayer closed 8 months ago

LainLayer commented 8 months ago

The command duplicates the same command-line arguments used to launch focus the first time. It starts a new process independent of the first one.

https://github.com/focus-editor/focus/assets/10339438/56d64d75-3dba-44b7-8166-c7417097f2b7

ileonte commented 8 months ago

Could we maybe call the command something other than open_another_window? Something like duplicate_session perhaps? If we ever decide to do multi-window in the same Focus instance (which was discussed before) we probably want to "reserve" command names with window in them.

focus-editor commented 8 months ago

How about we call it open_another_editor_instance?

Also @LainLayer , I noticed you made a typo in the command name, left a print statement in your PR and didn't follow the style of the surrounding code. I'm not a code style purist, but paying attention to those things shows that you care.

LainLayer commented 8 months ago

I addressed the issues, however, I could not notice where I didn't follow the style of surrounding code. Maybe I missed something obvious?

focus-editor commented 8 months ago

duplicate_session sounds confusing to me. Unless you guys have a better suggestion I'll rename it to open_another_editor_instance since it tells you exactly what it will do, whereas a "session" is ambiguous.

Re: style - I was referring to the space between the [] and the type