Sunday, 13 March 2011

Backing up the internet

Eclim is fabulous.

This post is purely to back up some information, because the original site seems to have disappeared. I found it from a Google cache, but that won't last forever. Here it is (apologies for the shoddy formatting):

Besides .vimrc setting, the complete flow to develop Android app using vim + command line is as follows:
  1. Start eclim by starting its server first. 

    eclimd&
  2. Navigate to project folder. (ex. ~/workspace), and start vim. Use :ProjectCreate to create new project
  3. Alternatively, navigate to existing project (ex. ~/workspace/your_android_app), use

    :ProjectTree <project name>

    to open existing one.

    But with the above .vimrc, vim/eclim should be able to automatically open the project tree view for you by just entering vim.  There is no need to follow this step, indeed.
  4. For editing, :FirstExplorerWindow to the tree view or Ctrl+w Ctrl+w, use :Tlist to open taglist

    Open new tab by <Enter> or open split window by <S>, when navigating in the project file tree view. 
  5. When :w, eclim will do :Validate for you, pointing out live syntax check and display suggestions like what you’ve got in Eclipse. 

    For auto-complete, Ctrl+x Ctrl+u as you’re used to. 
  6. To build project,

    :Ant

    Notes: if there is no build.xml, excute

    :!android update project -p .
  7. To start an AVD, use 

    android list avd

    emulator -avd <avd_name>

  8. To upload project to default emulator or device, 

    :Ant install
  9. To see LogCat debugging log, open another terminal, check available devices by 

    adb devices

    once you got what devices to look at, 

    adb -s <device_name> logcat
  10. To turn off eclimd, in vim, type :ShutdownEclim, or in command line, eclim -command shutdown

Tuesday, 1 March 2011

Fun with vim, fun with alpha, no fun with apks

I've been distracting myself for the last couple of days by installing eclim: it really is pretty amazing. I have yet to use it in anger, but I'm a vim user at heart: the last few months using Eclipse have felt like I was cheating (in a particularly inefficient way: a touchpad is even less efficient than a mouse).

The alpha testing so far has taught me a lot. There was one major bug that I had never seen, and a strongly desired enhancement (that I had planned, but much longer term), both of which are now sorted. It's also given me a good idea of how others will actually use the app: not necessarily the same way that I do.

But the biggest thing it has taught me is that it's not easy enough to install an apk file. When I tried to help my friend install it on her HTC Desire, it took much longer than it should, and we ended up having to install a file manager app from the market. So my next stage will be beta, and it will be on the market: it's so much easier to just send people a url that they can install from.