Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I install MacVim on OS X?

Tags:

vim

macos

macvim

I am using OS X 10.9.1 (Mavericks).

What are the systematic steps to install to Gvim or MacVim in Mac OS? If you write the steps using 1, 2, 3, ..., it would be easy to follow.

I must confess that I failed to understand all the instructions provided on MacVim page. Other google-searched webpages do not clarify. E.g.

What is $VIMRUNTIME ? What version of vim should I install for my OS?

Now somehow I have installed MacVim in my system (Not systematically I believe). I can see that I have a folder /Applications/gvim.app/MacVim.app/.

Now when I open a text file from MacVim, which was already written using vi-editor, MacVim does not recognize it. Also vi does not recognize whatever is written in MacVim!

How can I resolve this?

like image 716
hbaromega Avatar asked Sep 28 '22 22:09

hbaromega


People also ask

How do I use Macvim on my Mac?

How do I setup mvim so I can run it from Terminal? Try vim from the command-line. Disclaimer: this would work for Linux so I suppose it is similar on a Mac. Try to see the path (use " echo $PATH ") and add the folder to the MacVim executable to it if it's not there already (use " export PATH=$PATH:path/to/folder ").

Can you install vim on Mac?

To get started with the Vim, we either type simply vim on command line or we can open it via GUI by double clicking the vim icon shown in the Applications. Vim opens in the terminal which is shown in the image. Well, we have successfully installed and get started with the VIM editor on MacOS.

How do I open Macvim in terminal?

Try to reinstall your macvim with option --with-override-system-vim. it will create vi and vim command under /usr/local/bin/ and if you want to open a file from terminal using macvim, just type vi file or vim file . These two commands acted as mvim -v . That's all.


1 Answers

  • Step 1. Install homebrew from here: http://brew.sh
  • Step 1.1. Run export PATH=/usr/local/bin:$PATH
  • Step 2. Run brew update
  • Step 3. Run brew install vim && brew install macvim
  • Step 4. Run brew link macvim

You now have the latest versions of vim and macvim managed by brew. Run brew update && brew upgrade every once in a while to upgrade them.

This includes the installation of the CLI mvim and the mac application (which both point to the same thing).

I use this setup and it works like a charm. Brew even takes care of installing vim with the preferable options.

like image 267
reem Avatar answered Oct 17 '22 13:10

reem