Switching to vim from Eclipse
The goal of this entry is to write down helpful links/features that I don’t want to forget about as I transition to vim. I’ve just had enough with Eclipse-based IDEs. I used PDT for a couple of years and then switched to Aptana for the last year. There are a lot of useful features in these IDEs, but I became fed up with the crashes and various incompatibility issues I’ve run into over the years. Ubuntu would randomly freeze because of Eclipse — I had to go to a different tty to kill Eclipse/java.
Vim has been on the to-do list in terms of things to really learn in the last couple of years. I can already use it at a basic level, as I’ve used it for server administration for awhile now, but there was always so much more I wanted to learn. I figure this will make it a lot easier to work with other languages as well, so that I don’t need to switch to all sorts of editors very often, if at all. Before I’d use Aptana for PHP, switch to the Eclipse plugin for Scala, then switch to Counterclockwise (another Eclipse-based plugin) for Clojure — not that this kind of switching happens very often.
I started off with vimtutor, which was pretty helpful in picking up some new basic commands I didn’t know about. It also helped me nail down various concepts about keystrokes I never really realized — things like deleting N words, deleting until the end of the line, how it’s really you give it an action and then you tell the action what it should do, or how much it should do.
Of course, one of the natural starting steps is to customize your .vimrc file — there are a lot of people out there posting their own. One of the first sites I ended up was: http://spf13.com/post/ultimate-vim-config — kind of overwhelming at first. I didn’t want to just blindly throw all these plugins and settings without playing around with them, so I’ve slowly added settings/plugins over time as I’ve been learning about what they do and realizing what exactly I need.
So far, these are the things I would want some sort of help with — which I’ll update as I find plugins that fit:
- Opening files within a project (commandT – https://wincent.com/products/command-t — fuzzy search is great)
- Project explorer/listing — I might not need this since I have #1
- Autocompletion/Omnicompletion (param hinting)
- svn/git diffing/status checking (knowing what files have been changed and what those changes are)
- PHP docs (easy to google, but if I can just get the results locally with one or two keystrokes, that would be sweet)
I’m going to check out the plugins used in that ultimate vim config link — seems like there would be some really useful ones
Also found some helpful tips on the web:
http://mwop.net/blog/164-Vim-Productivity-Tips-for-PHP-Developers — good idea to map an interpreter/linter/tester to some keys, maybe combine this with checksyntax plugin
http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118 — holy smokes this is in-depth, some good tips about how to use vim
http://jonathan.jsphere.com/tagged/taming-vim — suggests a lot of plugins I’m going to give a try