Nvy icon indicating copy to clipboard operation
Nvy copied to clipboard

request only instance

Open lilixiong2018 opened this issue 4 years ago • 2 comments

I thank it will be great if it can be only one instance, then anytime I run "nvy anotherfile", it active previous Nvy instance (if had) and then open anotherfile to edit.

lilixiong2018 avatar Feb 20 '21 08:02 lilixiong2018

This is a good idea, by doing this though we would restrict Nvy to a single instance at all times which I think is not ideal default behaviour for all users. Maybe it should be implemented as a flag --single-instance, what do you think?

RMichelsen avatar Sep 05 '22 10:09 RMichelsen

I think having only one instance is far from ideal. I'm okay with opening many Nvy windows as they are light and open quickly but I understand how some people would want to reduce potential clutter and wasted resources, especially if someone has bloated nvim with many heavy plugins (I recommend cleaning it instead if possible).

Maybe something like "sessions" would work. For example: when first time Nvy is open with --session=work a new window is open, but the next time this option is passed it will just open that file in that instance and bring focus to it. This way we can benefit both from multiple instances and reduced clutter.

I'm just afraid this feature will introduce unnecessary complexity and make Nvy harder to maintain. Some simple solution is needed if at all.

EtiamNullam avatar Sep 07 '22 12:09 EtiamNullam

I will close this issue for now, if there is more interest in pursuing this please reopen and I'll reconsider, maybe with a proposal for a solution as well.

RMichelsen avatar Sep 21 '22 10:09 RMichelsen