> 
>>> I want the Vim version shipped with MacVim to be the new default in 
>>> terminal (as opposed to the Apple standard version).
>> [snip]
>>> In any case, when I type 'vim' in a terminal I want 
>>> /Applications/MacVim.app/Contents/MacOS/Vim this, not the Apple one.  How 
>>> do I do that?
>> 
>> Assuming mvim (included in the MacVim download) is on your path:
>> 
>>   alias vim='mvim -v'
>> 
>> Also I do this:
>> 
>>   export EDITOR='/Applications/MacVim.app/Contents/MacOS/Vim'
> 
> Thank.  I presume both are to be put in my ~/.bashrc?  Incidentally, why is a 
> brutal symlink a bad way of doing this?
> 

2 reasons:

* Any time Apple does an update with a new version of vim, your changes will be 
overwritten and you may not notice
* Apple’s own builtin (and some 3rd party scripts) sometimes rely on exact 
versions and exact layout of files as delivered by Apple, so overriding via 
settings is preferably to overwriting files. Any time you think of doing ’sudo 
…’, try and think of another way of doing it first

Yes, your ~/.bashrc or ~/.bash_profile are appropriate places to put these. By 
convention, you would put an alias command in your bashrc and export a variable 
from your ~/.bash_profile (you can look up the difference between login shells 
and interactive shells with man bash if you are curious as to why).

As for my part, I have a folder named ~/.bin in which I put my shell executable 
files, like mvim, and then in my .bash_profile I have ‘export 
PATH=~/.bin:${PATH}’, along with a few aliases in my .bashrc (vim, view, gvim, 
gview, vimdiff, gvimdiff etc). I use ~/.bin so that it is a hidden folder as 
far as the Finder is concerned, but many folks just call it ~/bin

Hope that helps,
Adam.



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to