11th
My Crush On Vim <3
So it has been a while since I don’t talk about vi/vim… I sadly had at some point to leave behind my goal to use vi/vim to work in more important things in the office.
But last week I regained my will to learn vim; and a lot of people at the office asked me why I do this… well what I’ve tell to them (and to myself) is that I needed to learn it because I don’t know in which platform I will be working at some point and Vim is one of those editors that is reliable on most of them (and is not made in Java).
So, one of the reasons I didn’t use Vim (even if I learned many of the commands) is that I didn’t know how to manage multiple files at the same time, after making a serious commitment to learn how to manage multiple files on the Vim environment, I got almost all my bases covered.
What I’m going to do know is give you all the steps I did in order to get familiar with vim, and finally what got me to use it as a replacement of TextMate (sometimes I go back to use some special features of TextMate, not that often though).
First of all, find yourself a good reference to get started, whatever works best for you… most of the tutorials are free, some of them are not. I did buy the book from O’Reilly Learning the vi and Vim Editors, because I wanted a well structured set of contents to learn from, I can say that is a great book to get started on the Vi field, and to get to know how to use the niceties of Vim. However, this book is mainly for first-time users, most of the high advanced stuff is online, but in order to understand that, first you need to understand the basics that this books covers.
After spending like 3 months reading (and practicing) all the commands and exercises from the O’Reilly Book, I started to look out how I could integrate easily my work environment with the Vim editor. Thanks to the developers of the rails.vim, NERDTree and FuzzyFinder plugins, it was not hard enough to get the Vim editor to work along. Also there were some good references from Fabio Akita (akitaonrails), Jason Stirk and Jamis Buck from the Ruby/Rails Community that helped me a lot in the process of installing all the things I needed.
After learning a lot of the cool stuff about navigation between files using ctags and the rails.vim plugin (watching the Fabio Akita screencast), I felt like I was about to stop using TextMate, there was just a really small thing holding me back. I really didn’t like the themes of vim; that’s why I took the time and effort to learn how to do colorschemas in Vim, and created the sunburst theme for the vim (the one I normally use in TextMate); The result… pure awesomeness, if you would like to use it, don’t hesitate to download it from this gist I made. Here is an screenshot to get you convinced ;-).
To summarize, the steps to get started wih Vim (on the Mac) are:
1. Download and install MacVim.
2. Download the .vim configuration files from github, either from my account or the one from Fabio Akita (mine is a fork of his with a few other niceties).
3. Follow the directions on the README of the github project.
4. Start coding, you have everything you need there.
