6

I've compiled Vim with Homebrew (OS X) like that:

brew install vim --with-client-server

And the --version request indeed confirms it:

a @ ~> /usr/local/bin/vim --version | grep serv
+clientserver    -hangul_input    +netbeans_intg   +title

Besides, just in case, it has X11 support, too:

a @ ~> /usr/local/bin/vim --version | grep X11
+digraphs        +mksession       +scrollbind       +X11

However, if I start Vim with the servername option like this: /usr/local/bin/vim --servername foo, asking then vim in another shell to enlist active servers returns just nothing:

 a @ ~> /usr/local/bin/vim --serverlist
 a @ ~>

Thus, I wonder, is it possible at all to use the client-server feature in the console mode, without GUI? Any positive feedback available?

A S
  • 1,195
  • 2
  • 12
  • 26

2 Answers2

1

The help tells:

The communication between client and server goes through the X server. 

(found with help client-server)

Thomas Baruchel
  • 7,236
  • 2
  • 27
  • 46
1

Yes, it's possible.

I'll write all the steps needed

  1. brew cask install xquartz
  2. Launch XQuartz. You might need to update it. (This step is missing for you)
  3. Logout and login, or restart your Mac.
  4. brew install vim --with-client-server

Now if you launch vim, XQuartz will be launched as well. And if you run vim with --servername <name> argument, you will be able to see the server using --serverlist option.

But after this, you have to launch XQuartz with vim, and also you have to do some work for making clipboard work well vim. I found a blog post and followed the it but failed to make it work correctly regarding the clipboard.

Subash
  • 7,098
  • 7
  • 44
  • 70
Sanghyun Lee
  • 21,644
  • 19
  • 100
  • 126