Skip to content

Instantly share code, notes, and snippets.

@dcosson
Created September 9, 2012 18:52
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save dcosson/3686437 to your computer and use it in GitHub Desktop.
Save dcosson/3686437 to your computer and use it in GitHub Desktop.
Compile Vim on OSX (Mountain Lion)
# default vim on osx doesn't have python, ruby support or clipboard support. These configure options add all that
# I also ran into problems using rvm ruby, had to include those libs in the LDFLAGS for vim
# Steps:
$ rvm install 1.9.1
$ rvm use 1.9.1 # vim doesn't support anything higher
$ curl ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 | tar xj
$ cd vim73
$ ./configure --with-features=huge --enable-perlinterp=yes --enable-rubyinterp=yes --enable-pythoninterp=yes --enable-multibyte
$ # edit src/auto/config.mk, add `-L/Users/dcosson/.rvm/rubies/ruby-1.9.1-p431/lib` to the LDFLAGS row
$ make
$ sudo make install
@spilth
Copy link

spilth commented Dec 27, 2012

Thank you so much for this! This got 7.3 working on my Mac so that I can now copy to the system clipboard :-)

@Liooo
Copy link

Liooo commented Apr 25, 2013

Nothing worked except this! Thanks a lot!

@erikwco
Copy link

erikwco commented May 30, 2013

Thanks after a few days to looking for an answer this is the golden key !! thanks !!

@naunga
Copy link

naunga commented Aug 23, 2013

The rvm command 'rvm install 1.9.1' failed for me on OS X Lion with the following error:

"The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read 'rvm requirements.' "

I was able to get past this by adding --with-gcc=clang to the rvm command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment