[TxMt] Re: A command to validate Ruby and Removing trailing whitespace?

Wilhelm Longshanks wilhelm.longshanks at gmail.com
Sun Dec 27 00:43:50 UTC 2009


On Sun, Dec 27, 2009 at 2:36 AM, Hans-Jörg Bibiko <bibiko at eva.mpg.de> wrote:
>
> 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.
>>>>
>>>> Wil
>>>
>>> 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.
>
> Hi,
>
> you can record a macro plus a tiny "hack".
>
> Maybe try the following:
>
> -create a dummy tmcommand "SaveDummy":
> save: current document
> input:none
> output:discard
> no command!
>
> -then record a macro
> 1) Remove trailing whitespace
> 2) Ruby Syntax Validation
> 3) SaveDummy
>
> -save that macro as e.g. "SaveRuby" bound to keystroke ⌘S with scope "source.ruby"

Thanks. That should work!

Wil



More information about the textmate mailing list