MacVim for Yosemite

For anyone out there that uses Macvim, and is annoyed by the lack of updates, I took some time over the past few days to merge in the latest vim updates (e.g. 7.4.493) as well as pulling in some commits from the open pull-requests to refactor the tabs and full-screen mode for Yosemite.

Please note, I am NOT the author of any of the actual code, credit for the Yosemite refactoring is all to @zenangst on github.

Also of note, this includes the proposed ‘Yosemite’ style icons by @jasonlong. I’ve not yet managed to merge in the old split-browser hack, maybe one-day I’ll actually learn Objective-C and be able to figure that part out, right now it’s beyond me (sorry, I’m just a fuck-up.)

Anyway, if you want to use/install this fork, the easiest way is with homebrew:

brew edit macvim

and change the line:

head 'https://github.com/b4winckler/macvim.git', :branch => 'master'

to:

head 'https://github.com/jocelynmallon/macvim.git', :branch => 'b4-yosemite'

Then run:

brew reinstall macvim --HEAD --with-lua --with-luajit --override-system-vim

And of course feel free to omit any options you don’t personally use.

macvim doc icons redux & howto

So I had some questions on how I generated the MacVim document/file type icons since the included script has been broken for a lot of people.

To use the /src/macvim/icons/ script, you need to make a few changes:

  1. You need a 512px version of the apple “GenericDocumentIcon.icns”
    • I took the 1024px version from Mavericks, exported all the png files, and created a new icns with 512px max size.
    • I placed the 512px icon in the “icons” directory and modified the docerator.py and make_icns.py files

  2. Copy or export a 512px version of the icon you want to use, rename it ‘vim-noshadow-512.png’, and place it in the /icons folder.
  3. Download a pre-compiled version of “makeicns” and place it in the /icons/makeicns folder, then comment out the relevant portion of the makefile.
  4. Modify the make_icns.py script to generate 512px for all sizes (alternatively you could just change every icon type to the ‘large’ preset instead of ‘small’, I just found it was fewer changes to add 512px to the small preset.)

  5. ‘cd’ into the /icons directory and run: ‘make getevny’ followed by ‘make all’
    (Note: this will generate an error at the end because we’re no longer using the ‘link’ option for any icons, you could always comment out the call to ‘link’ but I just haven’t bothered.)

A file broswer for macvim?

macvim-split-browser

So in my foray into learning vi/vim, I’ve discovered a wonderful fork of the already awesome macvim with a built-in file-browser. Now, apparently you can add a file browser to any vi/vim with plugins, but this version is written in Obj-C so it’s native to OSX.

And of course with my luck the fork hasn’t been updated in almost a year.

So I spent a few minutes today to fork the fork and merge in all the latest commits from the upstream macvim repo.

If anyone wants to use this fork, the easiest way is with homebrew, just edit the macvim formula:

brew edit macvim

Find this line:

head 'https://github.com/b4winckler/macvim.git', :branch => 'master'

And replace it with this:

head 'https://github.com/jocelynmallon/macvim.git', :branch => 'split-browser'

Then install from head (be sure to uninstall the old version first if you already had it installed):

brew install macvim --HEAD --override-system-vim