How can I set up Vim for Android development?


Question

Can anyone describe a good Vim setup for Android Development? I'm using Eclipse for now but I would really like to use Vim because it's faster and I like it better. I'm not interested in Eclim for example.

I'm interested in what Vim plugins are used (for Java, autocomplete etc.), how the .vimrc looks like and how the whole process of building/running applications works (as efficiently as possible).

1
72
12/17/2011 7:05:15 PM

Accepted Answer

I've once had to do some Android development on a netbook, and set up a nice Vim setup for this purpose. Seriously, it's easier than it seems:

  • Run emulator from the command line. It's better to do it anyway. I started mine with something like this:

    emulator -avd BlaDevice -no-boot-anim -scale 0.65 -show-kernel

  • To build and reinstall your modified app to the emulator, simply run ant reinstall from the project root. Map this command in Vim to your key combination of choice.

  • I've used typical Vim setup: NERDTree, FuzzyFinder, and omnicomplete. Java syntax highlighting works out of the box.

  • Never bothered to install Eclim, omnicomplete works just fine in most cases.

53
12/17/2011 7:09:06 PM

I've only done a little bit of Android development with VIM, but I'd very much suggest getting your head around Ant (which the SDK uses to build projects from the command line), and perhaps Maven if you're daring. You'll be using Ant a lot!

There are a few tab/auto-complete VIM scripts around, but don't expect them to be anywhere near as quick or useful as Eclipse. I've found myself doing a lot more typing than I'm used to from Eclipse...


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon