This plugin provides some features that simplify RubyMotion developing in Sublime Text 3.
-
RubyMotion syntax
It will work with RubyMotion project related *.rb and Rakefile. Code completion and Build system don't work in pure Ruby editing.
-
Code completion
It is same as RubyMotionSublimeCompletions. The only difference is syntax scope.
-
Build system (only work with RubyMotion)
Provides build system for RubyMotion. Supports four commands,
Build
,Clean
,Run
andDeploy
.Run
kick Terminal.app automatically.
Put this package into your Sublime Text 3 packages folder:
- Mac OS X
% git clone https://github.com/Watson1978/SublimeRubyMotionBuilder.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/RubyMotionBuild
- Open *.rb or Rakefile in your RubyMotion project
- You can see the "RubyMotion" on status bar in right bottom corner. Otherwise, it's not working. If Sublime Text 3 cache keep syntax as "Ruby", please close and open the file.
note: RubyMotion detection rule is projtect's Rakefile contains "Motion", or not.
- Inside your RubyMotion project just start typing the name of a method and the autocomplete window will pop up.
- Press enter/return to trigger the completion.
- Open *.rb or Rakefile in your RubyMotion project and enter [command + b].
- Wait for the console to notify you the message "[Finished]".
- If you get a error, you can jump to it with press [F4]
note: Default target is Simulator. If you want to change the target, please edit "RubyMotion.sublime-build".
- Open the Command Palette using [command + shift + p] and enter "clean".
- Select
RubyMotionBuilder: Clean
from the popup menu and press [return] - Wait for the console to notify you the message "[Finished]".
- Open *.rb or Rakefile in your RubyMotion project and enter [command + r]. If you want to enable retina, please enter [shift + command + r].
- Wait for the Terminal.app will kick Simulator.
- If you want to modify code and to try again, just re-enter [command + r]. Then, automatically post "quit" to Terminal.app and re-execute "rake".
note: Goto symbol
was assigned to [control + r]
- Open *.rb or Rakefile in your RubyMotion project and enter [command + option + b].
- Wait for the console to notify you the message "[Finished]".
- Open *.rb or Rakefile in your RubyMotion project.
- Select a word (like method) and enter [control + option + d].
These two commands also supported in Command Pallet.
RubyMotionBuilder: Generate syntax
will generate syntax and snippets from Ruby syntax.RubyMotionBuilder: Generate completions
will generate completions from BridgeSupport files of RubyMotion.