janjust
janjust

Reputation: 816

vim Mac OS X install with gui-support


I have Mac Pro, with OS X 10.9.4 (can't upgrade to Yosemite yet), and I'm trying to build vim7.4 with gui-support, or get any kind of gui-support. My current vim is version 7.3, I'm guessing, that's the default vim that ships with macs. I have the Terminal.app and iTerm2.app, my vim rc has the default

set term=xterm-256colors

or what have you.

What I have so far:

macvim

The colors look great, basically it's the same setup I had on my ubuntu system, but it's really annoying that it opens a new window. Is there a way to get it to open within my terminal? (not launch it from the terminal, open inside of it)

As I've said I have the regular vim7.3 And while I can use color-schemes, they look like garbage compared to my ubuntu system. I suppose this must be due to gui-support option? I tried, CSApprox but that gives me a weird error.

So I decided to simply build vim 7.4 and enable gui support, but I get random errors.
My basic config make looks like:

./configure --enable-gui=yes
make

At which point it complains about missing header file etc. , I figured this should not be that hard.

Any tips?

The basics of what I'm trying to do is:

Have a vim version installed with gui-support, or a work-around where my colors are all screwed up.

Thanks!

Upvotes: 10

Views: 19994

Answers (2)

romainl
romainl

Reputation: 196516

Building Vim on Mac OS X is a waste of time.

Step 1: Download the appropriate MacVim build from here.

Step 2: Put MacVim.app into the /Applications/ directory.

Step 3: Put the bundled mvim script somewhere in your PATH.

Done.

To run MacVim in your shell:

$ mvim -v filename

To run MacVim from your shell:

$ mvim filename

Upvotes: 11

kenorb
kenorb

Reputation: 166359

Building Vim with GUI on macOS using Homebrew:

  1. brew edit vim.
  2. Add a new line with option for GUI:

    option "enable-gui", "Enable GUI mode"
    
  3. Change from no to yes in the following line:

    opts << "--enable-gui=no"
    
  4. Install or re-install vim:

    brew reinstall vim --enable-gui
    

Troubleshooting:

  • If you've errors related to Python 3, see: vim's GH-2754.
  • Checkout new Homebrew PR at GH-25785 with above patch.

Upvotes: 6

Related Questions