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

Remove --startuptime #3

Open
Soares opened this issue Feb 24, 2014 · 3 comments
Open

Remove --startuptime #3

Soares opened this issue Feb 24, 2014 · 3 comments

Comments

@Soares
Copy link
Contributor

Soares commented Feb 24, 2014

Theoretically, there should be a way to poll vim and know when it's ready. Unfortunately, it's not as easy as it sounds.

Quoth dbarnett@:

I experimented with polling "--remote-expr 1" to see when vim is initialized, but that seems to not quite take care of it: tests still fail if we don't wait the full 0.5 seconds on startup. It looks like there's still a gap between when vim responds to "--remote-expr 1" and when it's actually "ready".

@AndrewRadev
Copy link

My solution to this problem is to check vim --serverlist for the name of the server I'm currently spawning. Relevant code path is here -> here -> here.

@dbarnett
Copy link
Contributor

Huh, I'll check if that works. Thanks for the tip.

Does that mean it's theoretically able to respond to --remote-expr before it's listed in --serverlist?

@AndrewRadev
Copy link

I vaguely recall that I also started with a --remote-expr, and it worked, but I think I did it with a :write call, just to test it out, and I didn't want to leave it like that. I then moved on to the --serverlist method and didn't look back. Sending a --remote-expr 1 didn't even occur to me, that's pretty clever (even if it doesn't work :)).

So, I can't say for sure, but I guess your experiments are proof enough :).

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

3 participants