0

I just installed macvim for the ease of installation and integration with Ruby and Python already built in. I know I can just double click on the vim.app icon to open a new window, but how can I make it so that if I am in terminal and type "vim" it will open the vim that macvim newly installed instead of the one that comes on mac.

Right now if I type in "vim" I get the one that was preinstalled, but I want it to open macvim. Any suggestions?

Thanks in advance, Max

1 Answer 1

2

Macvim normally is opened from the command line with

mvim

If you take the mvim script that came with MacVim and plave it in ~/bin (or symlink it if you prefer)

Then in your ~/.bashrc add the following line.

export PATH="~/bin:$PATH"

Then execute

source ~/.bashrc

This will place mvim in your PATH so that you can execute it.


If you want to alias vim to open macvim you can add the following to your ~/.bashrc (if mvim is not in your path)

alias vim=<full path to mvim>

If mvim is in your PATH you should just be able to put

alias vim=mvim
7
  • I get command not found.. I just stuck the unzipped folder into /Applications/ which contains MacVim, mvim, and README.txt
    – mharris7190
    Commented Jun 20, 2013 at 17:02
  • @mharris Add mvim to your PATH.
    – FDinoff
    Commented Jun 20, 2013 at 17:06
  • @mharris7190 see edit
    – FDinoff
    Commented Jun 20, 2013 at 17:18
  • I don't have ~/.bashrc ? no such file or directory... Is there something I am missing?
    – mharris7190
    Commented Jun 20, 2013 at 18:31
  • @mharris7190 just create missing files or directories
    – FDinoff
    Commented Jun 20, 2013 at 18:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .