Hi,<div><br></div><div>So this works for me.  In the .tm_properties file:</div><div><br></div><div>[ *.tex ]</div><div>scopeAttributes = 'attr.save-on-deactivate'</div><div><br></div><div>Then put attr.save-on-deactive in the scope for the 'Save on focus lost' command.</div>
<div><br></div><div>Be careful: scopeAttributes seem to only be attached to files when you open them, so if you change .tm_properties be sure to re-open the files.  You can make sure that the scope attribute has been set by using the "Show Scope" command in bundle development or Ctrl-Shift-P, just to check that the attribute is being set properly.</div>
<div><br></div><div>David.<br><br><div class="gmail_quote">On Wed, Feb 29, 2012 at 6:02 PM, Erik Ebsen <span dir="ltr"><<a href="mailto:eriklebsen@gmail.com">eriklebsen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font><font face="tahoma,sans-serif">Thanks, David. Your edits were enough to get the command working for me.</font></font><div><font><font face="tahoma,sans-serif"><br></font></font></div><div><font face="tahoma, sans-serif">How would a person go about limiting the scope of this command by file type? I understand that this is possible but haven't been able to get it to work yet.</font></div>

<div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">Seems like the Scope Selector or Content Match fields would be the place for that (using something similar to [ *.{css,txt,markdown,md,mdown} ] for the syntax) but I can't get it to work. I've tried this syntax with or without the brackets.</font></div>

<div><font face="tahoma, sans-serif"><br></font></div><div><font face="tahoma, sans-serif">--</font></div><div><font face="tahoma, sans-serif">Erik</font></div><br><div class="gmail_quote">On Wed, Feb 29, 2012 at 9:24 AM,  <span dir="ltr"><<a href="mailto:textmate-request@lists.macromates.com" target="_blank">textmate-request@lists.macromates.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Message: 5<br>
Date: Wed, 29 Feb 2012 15:17:50 +0000<br>
From: David Howden <<a href="mailto:dhowden@gmail.com" target="_blank">dhowden@gmail.com</a>><br>
To: TextMate users <<a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a>><br>
Subject: [TxMt] Re: scopeAttributes and deactivate working?<br>
Message-ID:<br>
        <<a href="mailto:CAP2kWKEubFLk0TaqaBXNd9B5szv_wwitCBWt6idRsDDMdJBaMQ@mail.gmail.com" target="_blank">CAP2kWKEubFLk0TaqaBXNd9B5szv_wwitCBWt6idRsDDMdJBaMQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi Ed.<br>
<br>
Try removing the scope selector and see if it works.  I have input set to<br>
"Nothing", and output to "Discard".<br>
<br>
I have added the command to the text bundle, so if you are still having<br>
problems I can just send you a copy of that.<br>
<br>
David.<br>
<br>
On Wed, Feb 29, 2012 at 3:12 PM, PowerPod <<a href="mailto:ed.moss@4ssom.com" target="_blank">ed.moss@4ssom.com</a>> wrote:<br>
<br>
><br>
> I created a "Command" in my personal bundle with:<br>
><br>
> Scope Selector: attr.save-on-deactive<br>
> Key Equivalent:<br>
> Tab Trigger:<br>
> Semantic Class: callback.application.did-deactivate<br>
> Content Match:<br>
> Save: Modified Documents<br>
> Input: Scope     Format: Text<br>
> Output: Replace Input    Format: Text<br>
> Caret Placement: After Output<br>
> Scroll for new output (unchecked)<br>
><br>
> Still no joy. Yes, I am anxious to get this working. :) I really appreciate<br>
> your help.<br>
><br>
> Thanks,<br>
><br>
> Ed.<br>
><br>
><br>
> David Howden wrote:<br>
> ><br>
> > Hi<br>
> ><br>
> > Ok, so as I understand it you you now need to have a command which has<br>
> the<br>
> > scope set to attr.save-on-deactive, and is fired by the semantic<br>
> > class: callback.application.did-deactivate<br>
> > and is set to save all modified documents.<br>
> ><br>
> > David.<br>
> ><br>
> > On Tue, Feb 28, 2012 at 5:00 PM, Edwin Moss <<a href="mailto:ed.moss@4ssom.com" target="_blank">ed.moss@4ssom.com</a>> wrote:<br>
> ><br>
> >> I am having no joy in getting this to work in my .tm_properties file.<br>
> >><br>
> >> [ *.{rb,erb,haml,js,html} ]<br>
> >> scopeAttributes = 'attr.save-on-deactivate'<br>
> >><br>
> >> Has anyone else got it to work? Any help would be appreciated.<br>
> >><br>
> >> Thanks,<br>
> >><br>
> >> Ed<br>
> >><br>
> >><br>
> >> _______________________________________________<br>
> >> textmate mailing list<br>
> >> <a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a><br>
> >> <a href="http://lists.macromates.com/listinfo/textmate" target="_blank">http://lists.macromates.com/listinfo/textmate</a><br>
> >><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > textmate mailing list<br>
> > <a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a><br>
> > <a href="http://lists.macromates.com/listinfo/textmate" target="_blank">http://lists.macromates.com/listinfo/textmate</a><br>
> ><br>
><br>
> --<br>
> View this message in context:<br>
> <a href="http://old.nabble.com/scopeAttributes-and-deactivate-working--tp33408128p33414690.html" target="_blank">http://old.nabble.com/scopeAttributes-and-deactivate-working--tp33408128p33414690.html</a><br>
> Sent from the textmate users mailing list archive at Nabble.com.<br>
><br>
><br>
> _______________________________________________<br>
> textmate mailing list<br>
> <a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a><br>
> <a href="http://lists.macromates.com/listinfo/textmate" target="_blank">http://lists.macromates.com/listinfo/textmate</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.macromates.com/textmate/attachments/20120229/1c555f6e/attachment.html" target="_blank">http://lists.macromates.com/textmate/attachments/20120229/1c555f6e/attachment.html</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
textmate mailing list<br>
<a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a><br>
<a href="http://lists.macromates.com/listinfo/textmate" target="_blank">http://lists.macromates.com/listinfo/textmate</a><br>
<br>
End of textmate Digest, Vol 45, Issue 50<br>
****************************************<br>
</blockquote></div><br>
<br><br>
_______________________________________________<br>
textmate mailing list<br>
<a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a><br>
<a href="http://lists.macromates.com/listinfo/textmate" target="_blank">http://lists.macromates.com/listinfo/textmate</a><br></blockquote></div><br></div>