Sublime Forum

SublimeAndroid

#1

There’s various plugins around related to android development in sublime. One thing that was seemingly lacking (or at least I hope I didn’t overlook it) is xml autocompletion for android layouts. So that has been my main focus with https://github.com/dskinner/SublimeAndroid

I’m still fairly new to sublime (under a month of use) but some other things I’d like to add are sane defaults for external packages related solely to android projects along with standard build configurations (or push changes upstream to SuperAnt to catch targets included externally).

SublimeAndroid is not currently in PackageControl as I’ve only made my first commit, and only lightly tested on xml layouts. Assuming you’ve configured a project with:

android update project -p ./

And the project root is one of your project folders, SublimeAndroid should be able to identify your sdk directory along with target sdk and provide tag, attribute, and value autocompletions. For example, <Image will suggest ImageView. android:scale will suggest scaleType and then further prompt for scaleType options such as matrix, fitXY, etc.

If you’re bored and want to hack on something, feel free to hack on this :smile: Until then, I’ll post another announcement once it’s a little more feature-filled and in PackageControl.

0 Likes

#2

Latest Features:

  • XML Layout Autocompletion

  • Emulator/Device instance selection where applicable

  • Auto configure external plugins for android project, including:
    [list]

    • SublimeJava
    • SublimeLinter
    • ADBView
  • Window Commands to build and run application

    • Android: Build command. Build standard ant targets listed in the sdk’s build.xml and your own custom targets
    • Android: Run command that conveniently builds, deploys, and runs application on target device
  • Auto build project in background to keep classpaths fresh for autocomplete, autoimport, and lint

  • Settings to configure the above behaviour where applicable
    [/list:u]

0 Likes

#3

Will need to check this! Thanks a lot! Eclipse is a nice IDE, but a very bad text editor.

0 Likes

#4

For some reason… after installing this package I can’t open a python file. the file is github.com/SublimeText/Tag/blob … ag_lint.py

0 Likes

#5

Hey,

I’d highly suggest anyone with issues file a report on the github issue tracker as I’ll be notified immediately.

github.com/dskinner/SublimeAndr … state=open

The initial state of the plugin caused it to try and do stuff for any file opened and I ran across multiple issues with it literally locking up the text editor when working on python and go projects.

The latest version of the plugin should resolve this as it checks appropriately if it’s dealing with an actual android project. The latest version has a submodule dependency now for managing external dependencies (which currently creates a hard dependency on Package Control). If this is a fresh clone, use

git clone --recursive git://github.com/dskinner/SublimeAndroid.git

Otherwise if updating from previous,

git pull
git submodule init
git submodule update
0 Likes

#6

Forgive me for the naive question, but I’m new to Sublime Text. I realize that these questions are not necessarily SublimeAndroid specific, but I can’t seem to find documentation that helps with this. If there is general “working with (not developing) plugins” documentation I would certainly love a link.

Can you please give me a very quick intro on how to use this plugin? There are a few particular things I’m looking for.

  1. How do I auto-configure my other plugins? Specifically I want to configure SublimeJava for the Android SDK but using the command palette (command-shift-p) I can’t seem to find any of the “Android: …” commands.

  2. When running build with the Build System set to SublimeAndroid, I get “Unable to find target command: android_ant_build” in the console.

I’ve installed SublimeAndroid with the following commands:

$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
$ git clone --recursive git://github.com/dskinner/SublimeAndroid.git

0 Likes

#7

[quote=“rharter”]Forgive me for the naive question, but I’m new to Sublime Text. I realize that these questions are not necessarily SublimeAndroid specific, but I can’t seem to find documentation that helps with this. If there is general “working with (not developing) plugins” documentation I would certainly love a link.

Can you please give me a very quick intro on how to use this plugin? There are a few particular things I’m looking for.

  1. How do I auto-configure my other plugins? Specifically I want to configure SublimeJava for the Android SDK but using the command palette (command-shift-p) I can’t seem to find any of the “Android: …” commands.

  2. When running build with the Build System set to SublimeAndroid, I get “Unable to find target command: android_ant_build” in the console.

I’ve installed SublimeAndroid with the following commands:

$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
$ git clone --recursive git://github.com/dskinner/SublimeAndroid.git[/quote]

Same here, it says “Unable to find target command: android_ant_build”…
Anyone?

0 Likes