TextMate is a great all-purpose text editor, but it really isn't very good at advanced text manipulation or navigation. Having dabbled in emacs and its far superior text navigation commands, I found myself getting increasingly frustrated with TextMate's very basic commands. Having to use arrow keys and fully move my right hand away from home row is unacceptable.
I unsuccessfully tried to switch to emacs. I found it bloated and clunky with awkward configuration and poor defaults, and quickly switched back to TextMate. I finally decided to give vim a try, and was surprised at how decent it was despite the steep learning curve. It has an elegance that emacs seems to lack. After two days of using it on a rails project I made the decision to commit to vim and invest in learning its many motions and commands.
Here are some great resources I used to get started:
- MacVim - the popular graphical vim for mac
- PeepOpen - this is the main reason I chose to use MacVim over the terminal vim. If you're coming from TextMate, you'll definitely want the awesome CMD+T shortcut it provides (and if you don't know what I'm talking about, prepare to become addicted)
- rails.vim - an essential plugin for rails developers
- snipmate.vim - an excellent snippets plugin that will feel very familiar to TextMate users
- Color Sampler Pack - a massive collection of excellent themes for vim
- VI Cheat Sheet - an excellent cheat sheet designed by GoSquared for Smashing Magazine
The two main vim config files are ~/.vimrc and ~/.gvimrc. MacVim will read both, so you'll want to put generic options in .vimrc and options that only apply to a graphical vim (such as the themes linked above) in .gvimrc.
A few learning references I found especially helpful are:
Update: A few excellent vim configuration walkthroughs were posted after this. These two posts are a must for getting your .vimrc in order!