I'm on a mac osx and I need to re-install or build VIM with some custom switches.

How should I go about doing this? Will it just write over the existing or should I un-install somehow?

I know macvim has it (+Ruby interpreter), but I want the standard vim to work.

link|improve this question

48% accept rate
feedback

2 Answers

If you do the normal make process:

./configure; make; make install

it will install the new binary vim in your /usr/local/bin directory. You can then either run it directly with /usr/local/bin/vim or make an alias in your .bashrc such as:

alias vim="/usr/local/bin/vim"

Then when you type vim at the command prompt it will run the new version of vim. The old version will remain at /usr/bin/vim. I wouldn't recommend deleting it as you may need to run it in the future.

link|improve this answer
You can also change your PATH so /usr/local/bin is searched before /usr/bin. BTW, another reason to put your custom vim in /usr/local/bin and leave the regular one alone, is so your custom version won't get randomly overwritten by a system update. – Gordon Davisson Jul 17 '11 at 5:13
feedback

I know that building something from source can be a weird source of pleasure — that's what I feel anyway — but there is a regular (CLI) Vim executable within MacVim's bundle with all the same functionalities.

Add this line to your ~/.bashrc or ~/.profile or wherever you are used to put aliases and custom bash functions:

alias vim='/path/to/MacVim.app/Contents/MacOS/Vim'
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.