Ultimate Vim Setup… finally! (Atleast for Mac)

I have been using Vim for almost 14 years now. I have tried many editors with Vi modes or plugins. None of them satisfactory.  The reason for my infidelity are lack of projects, fuzzy finder, and looks (yes I am a shallow bastard).

I have tried many times to use NERDTree. I am not going to into why, but in general it just feels clunky: It feels like someone tried to turn an editing pane into a file tree view. I know many love NERDTree, but I have tried, and don’t.

I have tried many different cmd-t/fuzzy-finder like plugins, but have never been totally happy with any of them. Actually that isn’t 100% true, as I was happy with Fuzzy Finder until I tried Sublime Text 2.  More on that below.

For the above two reasons, I have been cheating on Vim with Sublime Text 2 (ST2) a lot lately. The fuzzy-finder in Sublime Text 2 is heads and tails above anything else I have used. ST2 has a great look, I love the file drawer it has, and it has a Vi mode (cleverly named Vintage mode). Using ST2’s file drawer made me realize I don’t really need projects, just a file tree which I can set the root to that of  to my project’s root directory. I never didn’t find much use for the actual ‘projects’ feature of ST2.

So why didn’t I just use/switch t0 ST2? Because the Vintage mode is actually broken in a lot of ways, even on the very simple commands; namely linewise cut and paste.

Somehow in my internet travels I have come across two gems (not the ruby kind) that have given me all I ever wanted in Vim! The first is Alloy Vim, it is a branch of the MacVim code for Mac only that adds a file drawer. It doesn’t really add a lot of functionality other than a native GUI file drawer. You can manipulate and navigate it all with a keyboard too; truly in the spirit of vim, but looking native to OSX.

The second gem I found has been PeepOpen from the folks over at PeepCode.com. This basically adds ST2’s fuzzy-finder to a handful of mac editors, including Vim.  PeepOpen is an OS X native GUI app,  that acts as a standalone fuzzy finder with a tiny plugin for editors so it can communicate/manipulate with the editor. Regardless of what it is, it just works, no setup or mess, my description may be awkward, but trust me with it worked out of the box with Alloy MacVim.  It does cost about $10, but is well worth it. Unfortunately they don’t have a trail version.

If you are a Vim lover, and are on OS X, I highly suggest these tools.  Now my question to you is:  How can I get this setup to work on Windows or Linux?  I use Windows and Vim at work, and am often working on a Linux box as well, so I would love to find similar functionality with Vim on these platforms as well. So the question(s) is: Is there a GVim for windows with a file tree drawer? Is there a Windows equivalent of PeepOpen with a plugin for Vim? Either they don’t exist or Google has failed me.Please drop me a line if you know of such a thing.

My setup:
My MacVim Setup

9 responses to “Ultimate Vim Setup… finally! (Atleast for Mac)

  • Kyle Skrinak (@skrinakcreative)

    You can have Identical vim configurations for cygwin/X11, *nix and Mac. (Native Vim on Windows, much less so) You can make your vimfiles directory portable using dropbox or github. Vim is the bomb. Rephrase: Last year’s last year’s model: textmate. Last year’s model: ST2 Your grandfather’s grandfather and your future: Vim.

  • Collin

    Please don’t use GIF, your screenshots look horrible because of the dithering. Use PNG instead to get the space savings of GIF with more colors.

  • Brandon Cordell

    I would ditch PeepOpen for CtrlP which is an actual vim plugin. That gives you the same type of fuzzy file finder but also gives you a few extras like only searching open buffers, and MRU (most recently used) files.

    As for your file drawer ditch whatever you’re using and move to NerdTree by Scrooloose (one of the best Vim plugin developers out there). It will also give you a bunch of Vim extras like easy opening in tabs, and panes with different key strokes.

    Once you do that your setup will be ultimately platform INdependent and you’ll be all set.

    • Educated Squirrel

      I have since tried CtrlP and like it quite a bit. Out of the box, it isn’t quite as ‘fuzzy’ as some of the others, and requires you to be more aware of the directory structure. I see it has a hefty manual, so I am guess I can tweak that. I do like how it deals with nearby files though. I am going to start using it on Windows for now.

      I have tried NERDTree and Netrw many times over the years (and most recently last week), and the problem is that they are extremely deep plugins for what I need. I rarely use the a filebrowser but find it comforting to have open. Then when I got to use it, I can’t remember the seventy-eleven comamnds I need. I also don’t like how the operate in a regular pane. It means they aren’t persistent accross tabs (without yet another plugin), and I often accidently close it, or open a file in it, etc. In general they are an exercise in frustration for me, too many features, not intuitive enough. I am more that willing to invest time to learn something (hey, I mastered Vim years ago), but I have decided I would be better off with nothing that with NERDTree or netrw.

      • brand0ncordell

        Just a tip for using NERDTree across tabs. Set :NERDTreeToggle to a shortcut, e.g. I use n. Using the shortcut key will toggle NERDTree open in any tab you are in.

        This helps me keep my screen real estate as well since I can open and close it with ease.

      • Educated Squirrel

        This is a good tip. When I tried NERDTree, I actually did the same thing and found this did alleviate some of the pain. I have Alloy MacVim’s file drawer on a hotkey too.

      • brand0ncordell

        Whoops, that’s supposed to be Leader n (the comments are hiding anything wrapped in tags.

Get yer $0.02 in...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: