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

How to use it on the windows I get the fork issue? #132

Closed
woshichuanqilz opened this issue Dec 2, 2019 · 2 comments
Closed

How to use it on the windows I get the fork issue? #132

woshichuanqilz opened this issue Dec 2, 2019 · 2 comments
Labels

Comments

@woshichuanqilz
Copy link

pid = os.fork()
AttributeError: module 'os' has no attribute 'fork'

Here is the error msg I got. I want to use the nvr on win 10 for neovim, so I can open a new file in the new tab in current neovim

@mhinz
Copy link
Owner

mhinz commented Dec 2, 2019

Right, the README mentions:

If the targeted address does not exist, nvr starts a new process by running "nvim". You can change the command by setting $NVR_CMD. (This requires forking, so it won't work on Windows.)

Putting it in a nutshell, Windows is not specifically supported, but most features don't require any Windows-specific features. I have no Windows to test things, though.

So, that's only if nvr is starting a new process (use nvr --nostart to avoid that). You should still be able to specfify an existing process with nvr ---servername .... Check :echo v:servername in the running nvim to get the server name (as I don't know if nvr --serverlist is working on Windows either).

@mhinz mhinz added the windows label Dec 2, 2019
@mhinz
Copy link
Owner

mhinz commented Dec 2, 2019

I'm closing this, as there is no way to fork on WIndows, unless someone else implements a way around it.

But as said above, opening a new file in another process should work even on Windows, since no forking is needed for that.

It should be just nvr --servername ADDRESS my_file, whereas ADDRESS is :echo v:servername from the running nvim process. Or you make the nvim process start with a given server name. E.g. nvim --listen localhost:12345 (or NVIM_LISTEN_ADDRESS=localhost:12345 nvim for older Nvims). Then you the accompanying call would be nvr --servername localhost:12345 my_file.

(If there are further questions, feel free to ask them in here, even if the issue is closed.)

@mhinz mhinz closed this as completed Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants