[TxMt] Re: Save and strip whitespace
mailinglist at textmate.org
Tue Feb 14 11:18:26 UTC 2012
On 12/02/2012, at 15.36, Martin Kühl wrote:
> On Fri, Feb 10, 2012 at 11:33, Martin Kühl <martin.kuehl at gmail.com> wrote:
>> I see. Those are definitely not possible with TM1; maybe Allan will
>> consider adding the necessary hooks to TM2, but designing a good hooking
>> system takes time.
> Heh, of course the system is already in place. Actions with the semantic
> class "callback.document.did-save" are run on save; maybe there'll be
> another class "callback.document.will-save" for things like whitespace
It can presently be done as an export command, i.e.: callback.document.export
This will however only result in the data on disk getting whitespace stripped.
The will-save makes sense, but I might not add it right away, as I have some refactoring planned with respect to these things, so prefer not to add more complexity prior to that.
More information about the textmate