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

Opening files in Windows with single Goneovim instance #533

Open
ashrasmun opened this issue Apr 27, 2024 · 2 comments
Open

Opening files in Windows with single Goneovim instance #533

ashrasmun opened this issue Apr 27, 2024 · 2 comments

Comments

@ashrasmun
Copy link

Hello,

As a user, I would like to have only one instance on Goneovim opened at all times and be able to open files by default in that one instance without the need to circumvent it with scripts. GVim had a switch, I recon it was --remote, that enabled that functionality, but I've never seen it in Neovim.

Visual Code opens files like that.

@tfriedel
Copy link
Contributor

tfriedel commented Aug 10, 2024

I tried this, which works in regular neovim:
--- snip start ---
To open files in an existing instance of neovim, you can use the --remote or --remote-tab options provided by Neovim. You need to ensure that a Neovim server is running. Start the server with a specific server name:

goneovim --wsl -- --listen /tmp/nvimsocket

You can then open files in this instance using:

goneovim --wsl -- --server /tmp/nvimsocket --remote-tab somefile.txt

You'll need to ensure this server instance is always running when you try to open a new file. This setup might require some automation or a startup script.

--- snip end ---

And this kind of works. Unfortunately the second command spawns a new instance with an empty window. The file is however opened in the first instance.

@jlanzarotta
Copy link

This would be a fantastic feature. I am not able to use --wsl, so a native solution would be awesome.

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

No branches or pull requests

4 participants