Since vim is my editor of choice, I've always had a bit of a gripe with the Arduino IDE. I haven't actually gotten past setting it up but I'm pretty excited about arduino-cmake:
https://github.com/queezythegreat/arduino-cmake
It exposes some nice functions for cmake files so you can use your favorite editor or IDE and still have access to everything you need to build an upload an arduino sketch.