[TxMt] Default "Save As..." filename...

Thomas Aylott textmate at subtlegradient.com
Fri Oct 26 14:33:38 UTC 2007


On Oct 26, 2007, at 10:15 AM, Hans-Jörg Bibiko wrote:
> On 26.10.2007, at 15:34, Thomas Aylott wrote:
>> On Oct 26, 2007, at 9:07 AM, Hans-Joerg Bibiko wrote:
>>> added: do saveWithFilenameAndReopen '{name=XXX;overwriteMode;}'
>> Keen.
>> Can you add something that simply saves the document if it's unsaved?
>>
>> I could use the existing textmate command thing to save before  
>> running the command, but I want to do stuff with the unsaved file  
>> before saving it.
>> Thanks!
> Do you mean something like
>
> do saveWithFilename '{name=XXX;overwriteMode;}'
>
> without reopen it AND if the current document is unsaved AND the  
> current document is not a "untitled" document meaning it was already  
> saved before?
>
> Then it could be used like:
> "$TMTOOLS" do saveWithFilename '{name=$TM_FILEPATH;overwriteMode;}'
> <further code>
>
> --Hans

Yeah, that sounds great.
I guess I'd need to throw some logic in there for allowing them to  
saveas if it is untitled.
What's the best way to do that?
	Or could you work that in there too? ;)

—Thomas Aylott – subtleGradient—


More information about the textmate mailing list