Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that one can pass ./configure some flags to install vim with clipboard support. I want to do this via Macports.

In apt, there was a way to download a package's source without first installing it, then install it using dpkg. Is there a similar thing I can do in Macports? I'd like to have Macports download the vim source for me, and then ./configure it myself, then install it, so that Macports is aware of the installation in case I want to uninstall it for some reason.

If I can't do this via Macports, can I do it with brew? I'm trying to avoid downloading the source directly so that I can have some sort of a package manager be aware of my vim install in case I want to remove it.

share|improve this question
up vote 3 down vote accepted

You can see a port's variants with $ port variants <portname>: Vim has (among others) tiny, small, normal, big and huge.

Installing Vim with $ sudo port install vim +huge is the most conservative way to install Vim with clipboard support via MacPorts. I honestly don't know if it's available with +big or +normal but it wouldn't take more than 10 minutes to try all these versions.

You use CLI tools in Mac OS X just like you use their counterparts on Linux: just like it's not self-evident that you can do $ apt-get source vim and you have to actually do $ apt-get --help to know about it (or be told about it by other people), $ port --help or $ man port would have put you in the right direction very quickly.

While it is certainly both elegant and trendy, Homebrew's list of packages is very small compared to MacPort's: I'm not sure migrating is the wisest choice, here. Unless you are perfectly sure that your needs are and will remain fully covered by Homebrew.

share|improve this answer
I was aware of the port variants. I didn't want the "huge" variant of vim because of all the extra things it came bundled with. However, you did answer the more pertinent question, so I'll accept your answer. Also, I'm assuming that there isn't a way to get a port's source without creating my own port? That's unfortunate. As far as homebrew having the packages I need, I did double-check before migrating. :) – orryowr May 7 '12 at 0:13
Don't assume anything, read the docs: the whole install process can be broken up in several steps: fetch, checksum, configure and so on… A simple $ sudo port fetch vim will download the source for you to play with. But if you are ready to do the configuration yourself, why not just using the source from directly? Also, the "brew" below installs the "huge" version as well. – romainl May 7 '12 at 4:50
I was thinking that I'd have macports manage my package after configuring it -- mainly for removing it later. – orryowr May 8 '12 at 6:14
That's exactly what you'do with 0. $ sudo port fetch vim, 1. editing the config file, 2. $ sudo port configure vim, and 3. $ sudo port install vim. You do the configuration yourself and let MacPorts do the management. – romainl May 8 '12 at 7:46
Are you sure that +huge provides access to the clipboard? from what I see on the port file it just adds the --with-features=huge argument. – Raimondi May 8 '12 at 22:30

If you use brew with the duplicates vim dist it will compile with clipboard support:

brew install

share|improve this answer
What is the "duplicates vim dist"? – orryowr May 5 '12 at 23:13
They duplicate software that is already provided by OSX but which are more recent or bugfix versions – Hates_ May 5 '12 at 23:27
I'm migrating to homebrew as I'm typing... :) – orryowr May 5 '12 at 23:33
This is definitely the best way to do it if you don't want to include the gui with MacVim. – Ian Jul 15 '12 at 16:05

You must log in to answer this question.

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