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

opener opens a file in a new workspace instead of the existing editor when the editor is set to VS Code #34

Open
lgarron opened this issue Nov 15, 2024 · 2 comments

Comments

@lgarron
Copy link

lgarron commented Nov 15, 2024

My $EDITOR is set to code -w --.

When I use open(…) from opener to open a file in the current workspace, I expect it to… open in the current workspace. Basically all tools that I use handle this consistently.

Instead, opener opens in a new window.

@Seeker14491
Copy link
Owner

What platform are you on? The $EDITOR variable is not used by opener. If you want your app to use the $EDITOR variable you'd currently need to handle reading the variable and launching the specified command yourself, then you could fall back to using opener::open() if it's not set.

@lgarron
Copy link
Author

lgarron commented Nov 26, 2024

What platform are you on?

macOS!

The $EDITOR variable is not used by opener.

Hmm, I find that surprising, but I guess on reflection it makes sense. As much is I need both editor and OS opening functionality, I can probably live with a fallback like you suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants