Titanium Mobile TextMate Bundle

0 Flares 0 Flares ×

This weekend, esteemed community member Thomas Aylott (a.k.a subtleGradient) published his TextMate bundle for Titanium Mobile! This is a must have for any Mobile developer working on the Mac (and using TextMate of course). Installing his bundle is easy – you’ll probably want to install via git, so you can update the bundle via a simple git pull:

  1. EDIT: As per Jeff’s note below, make sure the Ruby JSON gem is installed: sudo gem install json
  2. cd /Users/[your username]/Library/Application\ Support/TextMate/Bundles
  3. git clone git://github.com/subtleGradient/JavaScript-Appcelerator-Titanium-Mobile.tmbundle.git
  4. reload your bundles or restart TextMate

To see the magic happen, simply start typing in a Titanium namespace:

At any point while typing a Titanium function, hit option+escape to bring up the code completion window. Once you’ve selected your function, hit the tab key to switch to the next argument:

There are some other goodies packed in there as well – typing “inc” then tab will create a Ti.include statement, and d+tab will output a Ti.API.debug statement. I definitely encourage you to check out this awesome TM Bundle, follow new developments in the project, and to shower praise and adulation on it’s author. Thanks for an outstanding contribution!

0 Flares Twitter 0 Facebook 0 LinkedIn 0 Email -- 0 Flares ×


  1. Gaurav

    You need to have ruby, gems and the json gem installed in order to use this.

  2. Volante

    Awesome! I would also recommend everyone to use JSLint. Here’s a textmate bundle http://github.com/johnmuhl/javascript-tools-tmbundle

  3. ben

    Also… need to have git installed. 😉


    Looks great – excellent addition.

  4. Gaurav

    @Volante: Thanks for the update about JSLint.

  5. I followed all instructions and did “sudo gem install json” but when I type “Ti.” I get nothing…. Any other help would be great!

    • make sure you reload the bundles or restart textmate.

  6. mstearne

    Coda code completion support would be great!

  7. Richard James

    Not sure if it’s me, textmate or the bundle but it does not fire everytime you type the DOT, in fact it seems to have a mind of it’s own. The there a way to make it manually fire… like for eclipse CTRL and SPACE ? Also the properties information window disappears when you move the mouse… is there anyway to make it hang around longer 🙂

  8. I both reloaded bundles and restarted text mate.

    I selected Titanium Mobile as the type

    Typed: Ti.

    and I get nothing.

    Any other suggestions?

  9. WOW! Got it working! COMPLETELY MISSED THE “option+escape” part!


  10. Ryan

    If you get this errror:

    ERROR: could not find json locally or in a repository


    sudo gem update –system
    sudo gem install json


  11. Ryan

    Sorry the above should have two dashes on system.

    sudo gem update –system

  12. The ‘Ti.’ completion only comes up when you use the titanium mobile JavaScript language syntax. Select it from the popup thing in the status bar.

    Option-escape works everywhere on anything that starts with ‘Ti.’ or ‘Titanium.’ e.g. ‘Ti.UI.create{OPT-ESC}’ will give you the completions popup for everything thatmatches that.

    Also, this article never mentioned the contextual tooltip help thing. Itworks by itself too! Simply hit ‘option-F1’ when your caret is on anything beginning with ‘Ti.’ or Titanium. It even works inside the parens! Try it all over the place to get a feel for it.

    This was only possible because of the excellent API.json file that the Titanium team published.

    Give me an API.json file and I’ll give you codecompletion for anything!

  13. Oh yeah… Be sure to check out my other bundles too. I have a JavaScript.tmBundle that includes autocomplete for browser specific API. It includes tooltips taken from quirksmode.org with permission from PPK!

    Also, SelectStuff.tmBundle is an absolute essential!

  14. Richard James

    Thanks Tony, the “option+escape” was exactly what I was looking for 🙂

  15. Jared

    Anyone else getting a Ruby error?

    /Applications/TextMat.app/Contents/SharedSupport/Support/lib/ui.rb:130:in `reopen’: can’t change access mode from “w” to “r” (ArgumentError)

    Then it’s a stack trace

Comments are closed.

Sign up for our blog!

computer and tablet showing Appcelerator software
Start free, grow from there.
0 Flares Twitter 0 Facebook 0 LinkedIn 0 Email -- 0 Flares ×