A Photo

posted 2 years ago available in high-res

Becoming a fan of MacVim
A few weeks ago some of my colleagues through down the gauntlet: learn vim or give up lead dog status.  Not wanting to shrink from a challenge I decided to start playing with it and got hooked.
The screenshot above shows one scenario in which (Mac)Vim really shines.  I really like the simplicity of setting up a split screen in vim.  When you’re trying to stick to a red-green-refactor cycle for developing business logic this layout is great.  Here I’ve got the spec on the left and the model on the right.  By sitting them side-by-side like this I don’t get quite as tempted to cheat the process, adding a bunch of code and then adding tests that pass, as I did in the singular view that I typically saw in most IDEs.
The other aspect of the screenshot is down at the bottom.  A few keystrokes in Vim and you can execute command line stuff from within Vim.  So not only can I view the spec and the model it’s describing side-by-side but I can also run the test in place as well.  And in the event of a failure — which I should have if I’m following the red-green-refactor approach properly — then I can see the failure, the spec that failed, and the class that failed.  Pretty powerful.
The comment that really got me to try Vim was that it’s everywhere.  Well, okay, not everywhere but it’s in all the environments that I need to use for development.  The MacVim release on my MBP is nice and stable.  Vim is, of course, alive and kicking on the Linux distros I’ve used for staging and production servers as well.  The rational was pretty simple: learn one tool and carry it with you everywhere.  That rational works for me.
Don’t miss Tim Pope’s Rails support
If you’re going to give MacVim a shot, make sure that you strongly look into the extensions that Tim Pope has constructed.  The vim-rails plugin is great for Rails developers.  For example, with vim-rails I can key “Rview accounts/show” and it opens up the Rails view for Accounts#show.  Tim’s also got plugins for haml and cucumber if you’re working with those, and recently added a wrapper for git.  Great stuff (not all of which I’ve been able to toy with but all worth a looksee.
So, what do I give up?
What you lose with Vim are some of the niceties of a traditional IDE.  Since I’ve only been using MacVim for a short while I have not found a project viewer like you’d have in TextMate and most IDEs.  Refactoring is a manual process… but in most Ruby IDEs that still true so you’re not sacrificing much if you can handle grep (from within Vim, of course!).

Becoming a fan of MacVim

A few weeks ago some of my colleagues through down the gauntlet: learn vim or give up lead dog status. Not wanting to shrink from a challenge I decided to start playing with it and got hooked.

The screenshot above shows one scenario in which (Mac)Vim really shines. I really like the simplicity of setting up a split screen in vim. When you’re trying to stick to a red-green-refactor cycle for developing business logic this layout is great. Here I’ve got the spec on the left and the model on the right. By sitting them side-by-side like this I don’t get quite as tempted to cheat the process, adding a bunch of code and then adding tests that pass, as I did in the singular view that I typically saw in most IDEs.

The other aspect of the screenshot is down at the bottom. A few keystrokes in Vim and you can execute command line stuff from within Vim. So not only can I view the spec and the model it’s describing side-by-side but I can also run the test in place as well. And in the event of a failure — which I should have if I’m following the red-green-refactor approach properly — then I can see the failure, the spec that failed, and the class that failed. Pretty powerful.

The comment that really got me to try Vim was that it’s everywhere. Well, okay, not everywhere but it’s in all the environments that I need to use for development. The MacVim release on my MBP is nice and stable. Vim is, of course, alive and kicking on the Linux distros I’ve used for staging and production servers as well. The rational was pretty simple: learn one tool and carry it with you everywhere. That rational works for me.

Don’t miss Tim Pope’s Rails support

If you’re going to give MacVim a shot, make sure that you strongly look into the extensions that Tim Pope has constructed. The vim-rails plugin is great for Rails developers. For example, with vim-rails I can key “Rview accounts/show” and it opens up the Rails view for Accounts#show. Tim’s also got plugins for haml and cucumber if you’re working with those, and recently added a wrapper for git. Great stuff (not all of which I’ve been able to toy with but all worth a looksee.

So, what do I give up?

What you lose with Vim are some of the niceties of a traditional IDE. Since I’ve only been using MacVim for a short while I have not found a project viewer like you’d have in TextMate and most IDEs. Refactoring is a manual process… but in most Ruby IDEs that still true so you’re not sacrificing much if you can handle grep (from within Vim, of course!).

Comments

About this site and its Author


The Tumblrs to Follow

  • cdmwebs
  • staff
  • paulsullivanjr
  • dawnvanasse
  • bitbltr