문제

I'm trying to update Vim (for use in Terminal) on my Mac. It's currently running version 7.3, but YouCompleteMe requires Vim 7.3.584, and won't run even though it's installed.

I've tried using a Vim alias in my .bash_profile:

alias vim='/Users/Conor/Applications/MacVim.app/Contents/MacOS/Vim'

However none of my Vim plugins are launched when I run Vim like this, any my vimrc file isn't recognised either.

How can I get this alias to recognise my existing Vim settings? Or is there a better way of upgrading Vim for mac?

도움이 되었습니까?

해결책

The *.tbz that you downloaded from the official page contains a mvim script.

Once you have moved that script somewhere in your $PATH you can start the MacVim GUI like this:

$ mvim filename

and the MacVim CLI like that:

$ mvim -v filename

From there the only thing you need is to change your alias to point to mvim:

alias vim='mvim -v'

The original built-in Vim and its runtime files stay untouched, MacVim uses its own runtime files located in the MacVim.app bundle and both honor your personal config (assuming they are located where they should be: ~/.vimrc and ~/.vim/).

Quick, clean and painless.

다른 팁

If you installed MacVim with HomeBrew you can use

brew install macvim --override-system-vim

If you just want pure vim with python support do:

brew install vim --override-system-vim --HEAD

I had the same issue as you, but this worked like a charm. You complete me works perfectly after this.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top