Currently we have tab triggers, key commands, and drag commands as ways of activating commands in TextMate. It would be very useful to be able to trigger commands when a file is saved, activated, or deactivated in the ui as well (there may be others but these are the ones that came to my mind). One example of where this would be useful is saving a GTD project file and having it automatically update a conext file with any necessary changes.
What do others think of this? Allan, how difficult would something like this be?
Matthew
On 29/7/2006, at 19:37, Matthew Johnson wrote:
[...] What do others think of this? Allan, how difficult would something like this be?
The difficult part is coming up with the proper system.
But there will be a more extensive callback system in/post 2.0. I need to drop Panther support first, as I want to integrate UTI’s in this.
I wasn't entirely sure what a UTI was either. "Uniform Type Identifier". An Ars Technical article (which I do actually remember reading back when Tiger came out):
http://arstechnica.com/reviews/os/macosx-10.4.ars/11
On Jul 29, 2006, at 1:42 PM, hadley wickham wrote:
But there will be a more extensive callback system in/post 2.0. I need to drop Panther support first, as I want to integrate UTI's in this.
Not urinary tract infections, I hope.
Hadley
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- Matt Anderson
On Jul 29, 2006, at 12:37 PM, Matthew Johnson wrote:
Currently we have tab triggers, key commands, and drag commands as ways of activating commands in TextMate. It would be very useful to be able to trigger commands when a file is saved, activated, or deactivated in the ui as well (there may be others but these are the ones that came to my mind). One example of where this would be useful is saving a GTD project file and having it automatically update a conext file with any necessary changes.
What do others think of this? Allan, how difficult would something like this be?
Actually Save is easy to do and I have been using it for a lot of things like
- Check Perl syntax on save - Automatically harvest/fill in markdown links on save - etc
To set it up:
- Define an empty Command, call it 'Save', set it to Save the current file, and give it the Cmd-S shortcut (this is the fallback) - For languages where you want Save to do more do as above, but add whatever command you desire and set the Scope Selector to the desired language
Works like a charme...
Gerd
Actually Save is easy to do and I have been using it for a lot of things like
- Check Perl syntax on save
- Automatically harvest/fill in markdown links on save
- etc
To set it up:
- Define an empty Command, call it 'Save', set it to Save the
current file, and give it the Cmd-S shortcut (this is the fallback)
- For languages where you want Save to do more do as above, but add
whatever command you desire and set the Scope Selector to the desired language
Very cool trick! It will let me do what I was thinking of when I originally came up with this idea. Thank you very much! :)
Matthew