Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open file in running onivim2 from command-line #1250

Closed
smolin opened this issue Jan 24, 2020 · 2 comments · Fixed by #3469
Closed

open file in running onivim2 from command-line #1250

smolin opened this issue Jan 24, 2020 · 2 comments · Fixed by #3469
Labels
A-cli Area: Command line interface A-technical Area: Technical issues, like platform support and issues that don't affect most users directly enhancement New feature or request U-revery Upstream: Potentially dependent on changes in revery

Comments

@smolin
Copy link

smolin commented Jan 24, 2020

I would like to be able to edit a file in a new tab in a running instance of onivim2, similar to the function of "gvim --remote"

Thanks.

@CrossR CrossR added A-cli Area: Command line interface A-technical Area: Technical issues, like platform support and issues that don't affect most users directly A-ux Area: Overall user experience and aesthetics enhancement New feature or request U-revery Upstream: Potentially dependent on changes in revery labels Jan 24, 2020
@CrossR
Copy link
Member

CrossR commented Jan 24, 2020

I've marked this as potentially an upstream change/feature, as I think its part of electrons singleInstance, so its perhaps something we can duplicate in revery. Communication with running apps from the CLI is useful for many projects, not just Oni2.

@glennsl glennsl removed the A-ux Area: Overall user experience and aesthetics label Feb 13, 2020
@kinglouie
Copy link

It would also be nice if this could be configurable so by default oni2 opens files in new tabs if there is a running instance instead of creating a new window.

bryphe added a commit that referenced this issue Apr 30, 2021
__Issue:__ On every platform, the `oni2` CLI command always opens a new window. In general, though, it's preferred to open and focus the existing window.

__Fix:__ Implement a similar strategy to [`node-single-instance`](https://github.com/pierrefourgeaud/node-single-instance/blob/master/index.js), just with native reasonml.

__Todo:__
- [x] Add flag to force open in a new instance
- [x] Fix stat crash for new files/directories
- [x] Add manual test case (open fresh instance, re-use instance, force new instance, open from terminal)
- [x] Fix opening folder for command line
- [x] Verify latest on Windows
- [x] Verify latest on OSX

Fixes #1250
Fixes #2947 
Fixes #3058
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: Command line interface A-technical Area: Technical issues, like platform support and issues that don't affect most users directly enhancement New feature or request U-revery Upstream: Potentially dependent on changes in revery
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants