is there a way of getting macvim as the default terminal Vim?

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

is there a way of getting macvim as the default terminal Vim?

Federico Calboli
Hi All,

I want the Vim version shipped with MacVim to be the new default in terminal (as opposed to the Apple standard version).  My understanding is that doing something like

sudo mv /usr/bin/vim /usr/bin/vim-apple
sudo ln -s /Applications/MacVim.app/Contents/MacOS/Vim /usr/bin/vim

is not encouraged -- though I might well be wrong.

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?

BW

F

--
--
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 because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: is there a way of getting macvim as the default terminal Vim?

Andrew Stewart
On 6 Feb 2014, at 13:21, Federico Calboli <[hidden email]> wrote:
> 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'

Yours,
Andrew Stewart

--
--
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 because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: is there a way of getting macvim as the default terminal Vim?

Federico Calboli
On 6 Feb 2014, at 12:33, Andrew Stewart <[hidden email]> wrote:

> On 6 Feb 2014, at 13:21, Federico Calboli <[hidden email]> wrote:
>> 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?

BW

F




signature.asc (899 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: is there a way of getting macvim as the default terminal Vim?

David Henderson

On 06 Feb 2014, at 04:38, Federico Calboli wrote:

>
> Thank.  I presume both are to be put in my ~/.bashrc?  Incidentally, why is a brutal symlink a bad way of doing this?
>
I don't think that it's the symlink that's considered bad form. It's altering /usr/bin. /usr/bin can and will get blasted by any Apple updates. If you want to go the symlink route then use /usr/local/bin and put it in your $PATH such that it loads before /usr/bin. That's the correct way to override the system /usr/bin.

David P Henderson
--
"Never attribute to malice that which can be adequately explained by stupidity."
    -- Robert J. Hanlon

--
--
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 because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: is there a way of getting macvim as the default terminal Vim?

Adam Horner
In reply to this post by Federico Calboli

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.




smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: is there a way of getting macvim as the default terminal Vim?

Tim Johnson
In reply to this post by Federico Calboli
* Federico Calboli <[hidden email]> [140206 03:31]:

> Hi All,
>
> I want the Vim version shipped with MacVim to be the new default in terminal (as opposed to the Apple standard version).  My understanding is that doing something like
>
> sudo mv /usr/bin/vim /usr/bin/vim-apple
> sudo ln -s /Applications/MacVim.app/Contents/MacOS/Vim /usr/bin/vim
>
> is not encouraged -- though I might well be wrong.
>
> 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?
  Looks like you're getting some good help on your question.
  I wanted to add that I use midnight command (compliments of
  macports (in my case) or homebrew). I have set vim as my default
  edit for MC.
  Here's some tips on that, if you are interested:
  http://www.cyberciti.biz/tips/midnightcommander-set-vi-as-default-editor-viewer.html
--
Tim
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com, http://www.tj49.com

--
--
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 because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.