如何在OS X上升级vim的* console *版本?

时间:2022-04-17 20:48:18

I'm sure this is a newbie question, but every time I've compiled/dl'ed a new version of vim for os x, running vim on the command-line opens up the gvim app. I just want to upgrade the console version (so I can, for example, have python compiled in to use omnicomplete).

我确定这是一个新手问题,但每次我为os x编译/删除新版本的vim时,在命令行上运行vim会打开gvim应用程序。我只想升级控制台版本(例如,我可以编译python以使用omnicomplete)。

5 个解决方案

#1


5  

You can also use MacPorts to handle the installation for you. Once you've installed it, run the /opt/local/bin/vim binary. I place this in my PATH before the system binary dirs (although be aware that this may cause problems for cmdline tools that rely on the versions of tools shipped with OS X).

您也可以使用MacPorts为您处理安装。安装后,运行/ opt / local / bin / vim二进制文件。我在系统二进制文件之前将它放在我的PATH中(尽管请注意这可能会导致依赖于OS X附带的工具版本的cmdline工具出现问题)。

#2


7  

If I understsood the question correcty, here is another solution: check out http://www.andrewvos.com/2011/07/23/upgrading-vim-on-os-x-with-homebrew/

如果我认为这个问题是正确的,那么这是另一个解决方案:查看http://www.andrewvos.com/2011/07/23/upgrading-vim-on-os-x-with-homebrew/

Really simple, fast, painless. It uses homebrew-alt and you also need to have mercurial installed (it will prompt you if not).

真的很简单,快速,无痛。它使用homebrew-alt,你还需要安装mercurial(如果没有,它会提示你)。

#3


2  

This may sound stupid, but are you copying the vim binary to /usr/bin? by default, the "vim" path is /usr/bin/vim. If you compile from source, you'll likely need to either copy the vim binary to /usr/bin/vim (thus overwriting the original vim), or launch the compiled version via absolute path (eg. ~/vim-checkout/build/vim).

这可能听起来很愚蠢,但你是否将vim二进制文件复制到/ usr / bin?默认情况下,“vim”路径是/ usr / bin / vim。如果从源代码编译,你可能需要将vim二进制文件复制到/ usr / bin / vim(从而覆盖原始的vim),或者通过绝对路径启动编译版本(例如〜/ vim-checkout / build) / VIM)。

that's just a guess, however. I can't see it being anything more than that.

然而,这只是猜测。我不能认为它不仅仅是那个。

#4


2  

With Homebrew:

brew install macvim
ln -s /usr/local/bin/mvim /usr/local/bin/vim

#5


1  

Can also symlink your new binary to /usr/local/bin/

也可以将你的新二进制文件符号链接到/ usr / local / bin /

#1


5  

You can also use MacPorts to handle the installation for you. Once you've installed it, run the /opt/local/bin/vim binary. I place this in my PATH before the system binary dirs (although be aware that this may cause problems for cmdline tools that rely on the versions of tools shipped with OS X).

您也可以使用MacPorts为您处理安装。安装后,运行/ opt / local / bin / vim二进制文件。我在系统二进制文件之前将它放在我的PATH中(尽管请注意这可能会导致依赖于OS X附带的工具版本的cmdline工具出现问题)。

#2


7  

If I understsood the question correcty, here is another solution: check out http://www.andrewvos.com/2011/07/23/upgrading-vim-on-os-x-with-homebrew/

如果我认为这个问题是正确的,那么这是另一个解决方案:查看http://www.andrewvos.com/2011/07/23/upgrading-vim-on-os-x-with-homebrew/

Really simple, fast, painless. It uses homebrew-alt and you also need to have mercurial installed (it will prompt you if not).

真的很简单,快速,无痛。它使用homebrew-alt,你还需要安装mercurial(如果没有,它会提示你)。

#3


2  

This may sound stupid, but are you copying the vim binary to /usr/bin? by default, the "vim" path is /usr/bin/vim. If you compile from source, you'll likely need to either copy the vim binary to /usr/bin/vim (thus overwriting the original vim), or launch the compiled version via absolute path (eg. ~/vim-checkout/build/vim).

这可能听起来很愚蠢,但你是否将vim二进制文件复制到/ usr / bin?默认情况下,“vim”路径是/ usr / bin / vim。如果从源代码编译,你可能需要将vim二进制文件复制到/ usr / bin / vim(从而覆盖原始的vim),或者通过绝对路径启动编译版本(例如〜/ vim-checkout / build) / VIM)。

that's just a guess, however. I can't see it being anything more than that.

然而,这只是猜测。我不能认为它不仅仅是那个。

#4


2  

With Homebrew:

brew install macvim
ln -s /usr/local/bin/mvim /usr/local/bin/vim

#5


1  

Can also symlink your new binary to /usr/local/bin/

也可以将你的新二进制文件符号链接到/ usr / local / bin /