[TxMt] feature request: autosave

Allan Odgaard allan at macromates.com
Fri Jan 14 16:12:05 UTC 2005


On Jan 14, 2005, at 16:35, Mats Persson wrote:

> 3b.	Allan, what's the TM_VAR for the whole document content? or can I 
> get to it other than [ echo `cat $TM_FILE_NAME > $TM_BACKUP_FILE `] ??

You'll need to read it from the file.

> 3c.  How do you retain the Newline/ CR in this when you redirect it 
> into  a new file ?? Losing them in my test command.

I think they are lost because you run the document through echo. Using 
cat alone with '>>' should be enough.

>> So should I do it *nix style and append ~ to the backup-files, or a 
>> prefix like .backup? [...]
> Allan, Although I may have misunderstood some parts of your thinking 
> there, it seems to me that you are complicating the whole thing. A 
> couple of 'simple' commands that uses TM & Unix power will do that job 
> well.

My thinking is that those people who'd like to have .backup files are 
probably not the same who'll role their own solution using the existing 
functionality (no offense meant to Paul ;) ).

> Allan, IF you'd like a challenge, then please consider binding 
> Commands with Menu choices as well. So that using either the menu or 
> the keyboard shortcut executes the Command.

Yes -- I'd like to have some sort of hooks on various actions (like 
save). The other day Jeroen asked for some indication about the find 
having wrapped, personally I'd probably favor sound and Jeroen thought 
it was a job for Growl, and in the end I'll probably use the status 
bar. But this should probably be one of many events that can be 
captured by user scripts (adding pre/post behavior and/or suppressing 
the default action).

I must confess that I know very little about AppleScript, but I think 
it supports something like this (event handler). It's something I will 
investigate further.

> Also, could you please make it so that we can remove a trigger from a 
> command and leave it empty. Now it captures any key stroke you do, and 
> the (x) button don't work.

The (x) button works for me!?!




More information about the textmate mailing list