ClosestStorm / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

Vim --remote commands fail when using terminal version of MacVim #431

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I can't seem to get the terminal version of macvim to start with a named server 
and receive commands.
In GUI MacVim, :echo serverlist() does show that the server is registered, but 
outputs nothing in the terminal version. However, even though the GUI version 
registers the server, the vim cmdline is unable to send it commands.

> What steps will reproduce the problem?

/Applications/MacPorts/MacVim.app/Contents/MacOS/Vim --servername VIM

(then, in separate window)

/Applications/MacPorts/MacVim.app/Contents/MacOS/Vim --servername VIM 
--remote-send iasdf

> What is the expected output? What do you see instead?

Expected: commands execute inside the "VIM" server instance.

Actual results: 

E247: no registered server named "VIM": Send failed.

> What version of MacVim and OS X are you using?

7.3 (65), 10.8.2

Original issue reported on code.google.com by lx-goo...@redundancy.redundancy.org on 18 Oct 2012 at 12:05

GoogleCodeExporter commented 9 years ago
The server requires a GUI to be running since it coordinates all the clients, 
see ":h macvim-clientserver".  Short of rewriting the whole client-server 
architecture there is not much I can do about this.

Original comment by bjorn.winckler@gmail.com on 18 Oct 2012 at 7:29

GoogleCodeExporter commented 9 years ago
But this doesn't work even if the GUI is running, if you use the command line 
vim to send a command. If both instances have to be GUI, that wouldn't make any 
sense, as the point is to send a request without spawning another editor 
instance.

Also, on other OSes, terminal/non-GUI vim can spawn and use a server without 
problem, as long as it's compiled with X11 support. I don't know if MacVim's 
architecture changed things so that this would no longer be possible, though.

Original comment by lx-goo...@redundancy.redundancy.org on 18 Oct 2012 at 7:53

GoogleCodeExporter commented 9 years ago
This issue is still apparent with Google's new testing plugin that relies on 
client server. https://github.com/google/vroom

Original comment by keithbsm...@gmail.com on 28 Feb 2014 at 2:50

GoogleCodeExporter commented 9 years ago
I still don't understand the issue.  The server must be started in GUI mode, so 
for example this works for me:

vim -g --servername HELLO
vim --servername HELLO --remote-send iasdf

To be clear: you can *send* commands from command line vim, but only a GUI vim 
can be the server.

Original comment by bjorn.winckler@gmail.com on 28 Feb 2014 at 6:39