Skip to content
alloy edited this page Jun 13, 2011 · 8 revisions

How to get the MacVim source code

Open up Terminal and type (this requires that you have Git installed):

$ git clone git://github.com/alloy/macvim.git

(If you do not have Git installed the "Download" button under the "Source" tab lets you download an archive containing the source code.)

How to build MacVim

First clone the repo as above, then configure with the flags you want, e.g.:

$ cd macvim/src
$ ./configure --with-features=huge \
              --enable-rubyinterp \
              --enable-pythoninterp \
              --enable-perlinterp \
              --enable-cscope

Once this has finished, build the project:

$ make

The resulting app bundle will reside under MacVim/build/Release. To try it out quickly, type:

$ open MacVim/build/Release/MacVim.app

To install MacVim, type

$ open MacVim/build/Release

and drag the MacVim icon into your Applications folder.

Enabling extra features

You can enable extra Vim features by passing the appropriate flags to configure. These are the parameters to configure you are most likely to want to enable:

  • All standard features: --with-features=huge
  • Cscope support: --enable-cscope
  • Python interpreter: --enable-pythoninterp
  • Ruby interpreter: --enable-rubyinterp
  • Perl interpreter: --enable-perlinterp
  • Universal binary: --with-macarchs=ARCHS (ARCHS=x86_64,i386,ppc,.., one or more items in quotation marks separated by spaces)
  • Mac OS X SDK version: --with-macsdk=VER (VER=10.4,10.5,10.6,..)

To see all available flags, type ./configure --help.

Notes on document icons

Each file type associated with MacVim has an icon representing it. This is called a document icon. By default MacVim uses a generic document icon for all file types, but it is possible to generate individual document icons for each associated file type.

To build document icons (assuming the cwd is the src/ directory):

$ cd MacVim/icons
$ make getenvy
$ make all

The make getenvy step is optional and requires an internet connection. This step downloads the Envy Code R font which is then used to generate the 16x16 icons to make them more legible. (The official build of MacVim uses the Envy Code R font.)

It is also possible to download document icons and unpack them to src/MacVim/icons if the automatic generation fails for some reason.

Note that document icons must be generated (or downloaded) before building MacVim!

Clone this wiki locally