This plugin provides some features that simplify RubyMotion developing in Sublime Text 2 and 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
and Deploy
.
Run
kick Terminal.app automatically.
note: This step requires Package Control.
command
+ shift
+ p
] and enter "install package".Package Control: Install Package
from the popup menu and press [enter
/ return
]enter
/ return
]Put this package into your Sublime Text 2 or 3 packages folder:
Sublime Text 2
% git clone https://github.com/RubyMotionJP/SublimeRubyMotionBuilder.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/RubyMotionBuilder
Sublime Text 3
% git clone https://github.com/RubyMotionJP/SublimeRubyMotionBuilder.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/RubyMotionBuilder
First, RubyMotionBuilder requires PATH
environment variable to run Build
and some commands.
Mountain Lion or later users can configure variable via /etc/launchd.conf
like
$ echo "setenv PATH $PATH" | sudo tee -ai /etc/launchd.conf
(Older Mac OS X users can configure using ~/.MacOSX/environment.plist
)
Then, reboot your Mac.
Functions | Key bind |
---|---|
Build | command + b |
Run | command + r |
Run Spec | command + option + r |
Deploy | command + option + b |
Run from list | command + option + l |
Set Breakpoint | control + option + b |
Show reference | control + option + d |
note: RubyMotion detection rule is project's Rakefile contains "Motion", or not.
enter
/ return
to trigger the completion.command
+ b
].F4
]note: Default target is Simulator. If you want to change the target, please edit "RubyMotion.sublime-build".
command
+ shift
+ p
] and press "clean".RubyMotionBuilder: Clean
from the popup menu and press [enter
/ return
].command
+ r
]. If you want to enable retina, please press [shift
+ command
+ r
].command
+ r
].
Then, automatically post "quit" to Terminal.app and re-execute "rake".note: Goto symbol
was assigned to [control
+ r
]
command
+ option
+ r
].command
+ option
+ r
].
Then, automatically post "quit" to Terminal.app and re-execute "rake spec".command
+ option
+ b
].command
+ option
+ l
].control
+ option
+ b
].
Then, the breakpoint was described in debugger_cmds
like b app_delegate.rb:7
control
+ option
+ d
].The command is supported in command palette.
RubyMotionBuilder: Generate completions
will generate completions from BridgeSupport files of RubyMotion.{
"terminal": "iTerm"
}
{
"activate_terminal": false
}
When you would run app through this plugin, the plugin will save changed files. You could disable this feature.
{
"auto_save": false
}
Copyright (c) 2012, 2013 Kentaro Hara
Copyright (c) 2014 RubyMotionJP
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.