Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Patch Vim with the breakindent patch on OS X with Homebrew

I'm on OS X 10.7 with Vim 7.3.

I'd like to install the breakindent patch.

Here's a way to do it on Linux with apt-get: Compiling VIM with breakindent patch.

How do I do this? I suppose it will involve building Vim via Homebrew (which is OK with me).

like image 598
aljabear Avatar asked Jul 04 '12 05:07

aljabear


2 Answers

  1. Use Mercurial to get the latest Vim source code:

    $ hg clone https://vim.googlecode.com/hg/ vim
    $ cd vim
    
  2. Grab the patch.

  3. Apply the patch as indicated in the linked thread:

    $ patch -p1 < /path/to/breakindent.patch
    
  4. Configure Vim with the options you need (python/ruby support, custom location, etc.):

    $ ./configure --with-features=huge <other options>
    
  5. Build and install:

    $ sudo make && make install
    
like image 75
romainl Avatar answered Sep 18 '22 23:09

romainl


I just modified the Homebrew formula for MacVim to optionally add that patch. If you want to try it out, you can download the formula at https://gist.github.com/4108848 and plunk it in /usr/local/Library/Formula; then install using brew install --with-breakindent-patch macvim.

(EDIT: I used to have a link to my GitHub fork of Homebrew here, but I've decided to delete that fork unless I actually submit anything to Homebrew. The old formula could optionally add a patch that's been added to the main Vim since then.)

like image 21
echristopherson Avatar answered Sep 21 '22 23:09

echristopherson