Sublime Text Tips & Tricks
I’ve been using Sublime Text for a while now.. At first I really wondered why I should use it, what does it have extra when compared to Eclipse? I’m still wondering what but I do know I like Sublime better.. It just feels faster and more lightweight (which of course it is). I do use Ti Studio once in a while.. Ti Studio for building and deploying Titanium projects, I do the coding in Sublime.. I have a slightly modified version of the TiBuild plugin to be able to build Ti projects and test them on the iOS/Android simulator.. The current GitHub version of TiBuild was broken, so I debugged it and have it up & running in my dev environment. You can download it here. If you want a more RAPID Titanium development experience I’d really would like to recommend to take a look at TiShadow ..
I’m still searching for an easy to use SFTP client for Sublime which works from the folders-panel (so I can ditch Eclipse entirely) and I’d really like a terminal panel somewhere (preferably at the bottom of Sublime) so I can keep an eye on the output of TiShadow server.. Any tips are welcome ;)
Links:
- GETTING STARTED WITH SUBLIME TEXT 3: 25 TIPS, TRICKS, AND SHORT : https://blog.generalassemb.ly/sublime-text-3-tips-tricks-shortcuts/
- A bit outdated but still useful, Tutorial: Sublime Text for Titanium & Platino (Code + Build + Debug) http://www.dunkelgames.com/tutorials/use-sublime-text-to-code-for-appcelerator-titanium-platino
I’ll update this post with more tips & tricks when I encounter them.
TiShadow and Sublime.
If you don’t want TiShadow to push your app automatically when you save a file you can add a new build system in Sublime which will invoke a Tishadow run command and push your app to your devices.. In order to do this create a new build system from Tools->Build System->New Build system … and add :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
{ "cmd": ["tishadow run"], "working_dir": "${project_path:${folder:${file_path}}}", "shell": true, "variants": [ { "name": "run", "cmd": ["tishadow run"] }, { "name": "update", "cmd": ["tishadow run --update"] }, { "name": "clear", "cmd": ["tishadow clear"] } ] } |
Save the file and select this new build system from Tools->Build System->[your new build system].. In order to invoke the build process press Ctrl/Cmd-B et voila; your app should run on all devices connected to your TiShadow server. You can also use Ctrl/Cmd-P and enter update (to update running app) or clear (to clear the builds).
Credits go to Dunkelgeist for creating this snippet : http://www.dunkelgames.com/tutorials/tutorial-build-for-all-your-devices-at-once-with-tishadow-and-sublime-text