在 Mac OS X 上使用 +clientserver 功能编译 Vim 7.3 [英] Compile Vim 7.3 with +clientserver feature on Mac OS X
问题描述
如何在 Mac OS X 上使用 clientserver
功能编译 Vim?我有 vim-7.3.tar.bz2 源
How do I compile Vim with the clientserver
feature on Mac OS X? I have the vim-7.3.tar.bz2 source
我知道 MacVim 内置了此功能,但它仅在 GUI 运行时有效.我想使用 CLI 版本,因为使用 CLI 使我的工作更加轻松(例如,我可以轻松切换到终端).
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).
我使用以下 ./configure
选项编译了 Vim 7.3
I compiled Vim 7.3 with the following ./configure
options
./configure --enable-rubyinterp --enable-pythoninterp --with-features=huge
我在 Unix 上看过这个 问题Linux,但它只负责 Ubuntu 解决方案.此外,由于我启用了 huge
功能集,我应该期待 +clientserver
,根据 vimdoc:
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:
因此,如果一个特性被标记为N",则它包含在 Vim 的普通版本、大型版本和大型版本中.
Thus if a feature is marked with "N", it is included in the normal, big and huge versions of Vim.
更新:
服务器功能仅适用于 GUI MacVim.重现这个:
Update:
The server feature only works with GUI MacVim. To reproduce this:
$ Applications/MacVim.app/Contents/MacOS/Vim --servername VIM
另一个控制台中的:
$ vim --serverlist # does not output anything
如果我要启动 GUI MacVim,
Whereas if I'll fire up the GUI MacVim,
$ vim --serverlist
VIM1
但我的要求是在 CLI Vim 中工作.
But my requirement is to work in CLI Vim.
推荐答案
我通过添加 --enable-gui=gtk2
./configure --enable-rubyinterp --enable-pythoninterp --with-features=huge --enable-gui=gtk2
然后从控制台运行:
$ vim --servername FOOBAR_SERVER
来自另一个控制台:
$ vim --serverlist
FOOBAR_SERVER
或者从任何 Vim 实例中:
Or from within any Vim instance:
:echo serverlist()
FOOBAR_SERVER
请注意,X11.app 也会启动,因为 Vim 服务器需要运行.
Note that X11.app will also boot up as it is necessary for the Vim server to function.
这篇关于在 Mac OS X 上使用 +clientserver 功能编译 Vim 7.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!