use vim in /usr/local ?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

use vim in /usr/local ?

Christopher J. Bottaro-2
Hello,

I'm suffering from frequent crashes.  After Googling around, it seems to be related to the vim that is included with Lion (/usr/bin/vim).  So I compiled vim from source and installed it to /usr/local.

How do I get MacVim to use that vim instead of the Lion default?

Thanks,
-- C

--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Dan
Reply | Threaded
Open this post in threaded view
|

Re: use vim in /usr/local ?

Dan
Chris,

MacVim already comes with a compiled version of vim with it and it does not use Lion's default.  But if still want to use your new local copy of vim then create a symbolic link to your copy in /path/to/MacVim.app/Contents/MacOS/.  Within terminal switch to that directory and do:

mv Vim Vim_backup

ln -s /usr/local/bin/vim Vim

Of course, I have no idea how MacVim will behave if you do this.  If you want to revert your changes then either re-download MacVim or from the same directory described above do:

rm Vim

mv Vim_backup Vim

Regards,

Danny

On Nov 9, 2011, at 6:17 PM, Christopher J. Bottaro wrote:

> Hello,
>
> I'm suffering from frequent crashes.  After Googling around, it seems to be related to the vim that is included with Lion (/usr/bin/vim).  So I compiled vim from source and installed it to /usr/local.
>
> How do I get MacVim to use that vim instead of the Lion default?
>
> Thanks,
> -- C
>
> --
> You received this message from the "vim_mac" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: use vim in /usr/local ?

David Henderson
In reply to this post by Christopher J. Bottaro-2
On 09 Nov 2011, at 16:17, Christopher J. Bottaro wrote:

I'm suffering from frequent crashes.  After Googling around, it seems to be related to the vim that is included with Lion (/usr/bin/vim).  So I compiled vim from source and installed it to /usr/local.

How do I get MacVim to use that vim instead of the Lion default?

MacVim uses a custom binary of vim installed in its application package not the default system vim in /usr/bin. Perhaps your version of MacVim needs updating for compatibility with Lion.

David P Henderson
c: xxx.xxx.xxxx
--
"To announce that there must be no criticism of the president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public." 
    -- Theodore Roosevelt

--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: use vim in /usr/local ?

Darcy
In reply to this post by Christopher J. Bottaro-2
Add this to your .bashrc (etc...)

# Move (or Add) /usr/local/bin to the front of the path
[ -d /usr/local/bin ] && export PATH=$(echo /usr/local/bin:$PATH | sed
-e 's;:/usr/local/bin;;')

Now any executable in /usr/local/bin will be found before other
possible instances of the executable found in your path.

As an FYI, I add this immediately after:
# if there is a bin folder in home, add it to PATH
[ -d ~/bin ] && export PATH=~/bin:$PATH

So similarly, any executable found in ~/bin will take precedence.

As a side node, as a mac user, you may prefer to install macvim and
other apps via brew https://github.com/mxcl/homebrew
Brew makes it easy to keep up to date with latest builds and manages
the builds under /usr/local for you.  If you're using macvim, it also
comes with vim.  I access it by adding these lines to my bashrc

vim='/usr/local/Cellar/macvim/7.3-62/MacVim.app/Contents/MacOS/Vim -
n'  #Update path as required...
alias vim="${vim}"

Darcy
On Nov 9, 7:17 pm, "Christopher J. Bottaro" <[hidden email]>
wrote:

> Hello,
>
> I'm suffering from frequent crashes.  After Googling around, it seems to be
> related to the vim that is included with Lion (/usr/bin/vim).  So I
> compiled vim from source and installed it to /usr/local.
>
> How do I get MacVim to use that vim instead of the Lion default?
>
> Thanks,
> -- C

--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: use vim in /usr/local ?

Björn Winckler
In reply to this post by Dan
On 10 November 2011 01:37, Daniel Abad wrote:
>
> MacVim already comes with a compiled version of vim with it and it does not use Lion's default.  But if still want to use your new local copy of vim then create a symbolic link to your copy in /path/to/MacVim.app/Contents/MacOS/.  Within terminal switch to that directory and do:
>
> mv Vim Vim_backup
>
> ln -s /usr/local/bin/vim Vim
>
> Of course, I have no idea how MacVim will behave if you do this.

Daniel, in the nicest way I can possibly think of I ask you: why would
you suggest such a thing if you admittedly do not know what it does?

I can tell you what will happen -- it will break MacVim completely.
Do not do this.

Please, everybody reading this list, never do anything this silly, nor
give such outrageous advice.  The only thing that will come of this is
I'll get really weird bug reports and unnecessarily waste time trying
to help people to get MacVim working again. :-O

Björn

--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: use vim in /usr/local ?

Björn Winckler
In reply to this post by Christopher J. Bottaro-2
On 10 November 2011 01:17, Christopher J. Bottaro wrote:
> I'm suffering from frequent crashes.  After Googling around, it seems to be
> related to the vim that is included with Lion (/usr/bin/vim).  So I compiled
> vim from source and installed it to /usr/local.

I've had some reports of frequent crashes under Lion but so far I've
not been able to reproduce most of them.  One crash that I did track
down relates to using Python plugins.  If you have this problem (which
I doubt since the builtin Vim does not support Python) you should
download snapshot 63 (released today) since it fixes this problem.

If this is not your problem then I'd be very interested to know if you
have some way to reproduce this problem?

> How do I get MacVim to use that vim instead of the Lion default?

Now I am confused.  You first said you used the builtin version of
Vim.  Are you now saying that you are actually using MacVim?

Björn

--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Dan
Reply | Threaded
Open this post in threaded view
|

Re: use vim in /usr/local ?

Dan
In reply to this post by Björn Winckler
Bjorn,

I apologize if this has caused you any trouble.  My intent was not suggest to do such a thing, only to answer the original submitter's question on how.  That is why I first said that MacVim comes with its own compiled version of vim and gave warning that its behavior could be undefined.  You're right though, I should have advised not to.

Regards,

Danny Abad

On Nov 10, 2011, at 2:26 PM, björn wrote:

> On 10 November 2011 01:37, Daniel Abad wrote:
>>
>> MacVim already comes with a compiled version of vim with it and it does not use Lion's default.  But if still want to use your new local copy of vim then create a symbolic link to your copy in /path/to/MacVim.app/Contents/MacOS/.  Within terminal switch to that directory and do:
>>
>> mv Vim Vim_backup
>>
>> ln -s /usr/local/bin/vim Vim
>>
>> Of course, I have no idea how MacVim will behave if you do this.
>
> Daniel, in the nicest way I can possibly think of I ask you: why would
> you suggest such a thing if you admittedly do not know what it does?
>
> I can tell you what will happen -- it will break MacVim completely.
> Do not do this.
>
> Please, everybody reading this list, never do anything this silly, nor
> give such outrageous advice.  The only thing that will come of this is
> I'll get really weird bug reports and unnecessarily waste time trying
> to help people to get MacVim working again. :-O
>
> Björn
>
> --
> You received this message from the "vim_mac" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php

--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: use vim in /usr/local ?

Christopher J. Bottaro-2
In reply to this post by Björn Winckler
On Nov 10, 2011, at 3:40 PM, "björn" <[hidden email]> wrote:
>> How do I get MacVim to use that vim instead of the Lion default?
>
> Now I am confused.  You first said you used the builtin version of
> Vim.  Are you now saying that you are actually using MacVim?

I read something that seemed to suggest MacVim used an external vim
binary and that is what's actually crashing. So if you just get MacVim
to use a different vim binary, the problem would be solved.

Apparently that's not the case though... :)

Anyway, I reinstalled MacVim with brew using the --head option and I
haven't experienced a crash yet.

-- C

--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php