[TxMt] Re: A command to validate Ruby and Removing trailing whitespace?
bibiko at eva.mpg.de
Sat Dec 26 17:36:10 UTC 2009
On 26.12.2009, at 18:06, Wilhelm Longshanks wrote:
> On Sat, Dec 26, 2009 at 11:35 PM, Rick DeNatale <rick.denatale at gmail.com> wrote:
>> On Sat, Dec 26, 2009 at 9:04 AM, Wilhelm Longshanks
>> <wilhelm.longshanks at gmail.com> wrote:
>>> Is there a command to validate Ruby and Removing trailing whitespace?
>>> I want to improve Command-S for Ruby development. I want to do
>>> both of the commands at the same time.
>> ctrl-shift-v validates
>> cmd-shift-delete removes trailing whitespace
> Right. But I'd like to invoke both at the same time when I hit Command-S.
you can record a macro plus a tiny "hack".
Maybe try the following:
-create a dummy tmcommand "SaveDummy":
save: current document
-then record a macro
1) Remove trailing whitespace
2) Ruby Syntax Validation
-save that macro as e.g. "SaveRuby" bound to keystroke ⌘S with scope "source.ruby"
More information about the textmate