Compile Vim 7.3 with +clientserver feature on Mac OS X

client-server, compilation, macos, vim

Solution

I got it to work by adding `--enable-gui=gtk2`

./configure --enable-rubyinterp --enable-pythoninterp --with-features=huge --enable-gui=gtk2

Then run from the console:

$ vim --servername FOOBAR_SERVER

From another console:

$ vim --serverlist
FOOBAR_SERVER

Or from within any Vim instance:

:echo serverlist()
FOOBAR_SERVER

Note that X11.app will also boot up as it is necessary for the Vim server to function.

Problem

How do I compile Vim with the `clientserver` feature on Mac OS X? I have the vim-7.3.tar.bz2 source I understand that MacVim has this built in, but it only works when the GUI is running. I want to work with a CLI version, as my work is so much easier with the CLI (I can switch to the Terminal with ease, for example). I compiled Vim 7.3 with the following `./configure` options ``` ./configure --enable-rubyinterp --enable-pythoninterp --with-features=huge ``` I have looked at this question on Unix & Linux, but it only takes care of the Ubuntu solution. Also, since I enabled the `huge` feature set, I should expect `+clientserver`, according to the vimdoc: Thus if a feature is marked with "N", it is included in the normal, big and huge versions of Vim. Update: The server feature only works with GUI MacVim. To reproduce this: ``` $ Applications/MacVim.app/Contents/MacOS/Vim --servername VIM ``` The in another console: ``` $ vim --serverlist # does not output anything ``` Whereas if I'll fire up the GUI MacVim, ``` $ vim --serverlist VIM1 ``` But my requirement is to work in CLI Vim.

Original source

Related problems