<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Jan,<div><br></div><div>Hard to believe that I wrote that little bundle 5 years ago now. Glad to see some people still find it useful! I've committed a new "Update Project / Selected Files" command for it. It doesn't use AppleScript, so hopefully that will make it a little faster. And it only processes files that has the "tminclude" tag in them. Hopefully it will make it's way to the core TextMate bundle soonish. Until then, if you want to pull from my fork to try it out, you'll find it here:<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://github.com/bradchoate/html.tmbundle">https://github.com/bradchoate/html.tmbundle</a></div><div><br></div><div>-Brad<br><div><br></div><div><br><div><div>On Sep 16, 2011, at 2:59 AM, Jan Lübke wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I am new to Textmate. Great tool!</div><div><br></div><div>I love the persistent includes in the html-bundle. However I miss a method to update all files of a project at once. This topic was discussed earlier on this mailing list in 2007, but I could not find any follow up.</div><div><br></div><div>To work around this, I whipped up an apple script like this:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; color: rgb(95, 97, 97); ">-- Update all persistent includes in Textmate</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; color: rgb(95, 97, 97); ">-- allow Apple Script to execute keystrokes</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>tell</b> <span style="color: #3300fc"><i>application</i></span> "System Events" <b>to</b> <b>set</b> <span style="color: #8100d9">UI elements enabled</span> <b>to</b> <span style="color: #5d2790">true</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; color: rgb(95, 97, 97); ">-- choose the textmate-project-file</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>set</b> <span style="color: #549213">ProjectFile</span> <b>to</b> (<span style="color: #2416bb"><b>choose file</b></span> <span style="color: #2416bb">with prompt</span> "please choose Textmate-Project")</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; color: rgb(95, 97, 97); ">-- TODO: check, if a valid projectfile was chosen</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>tell</b> <span style="color: #3300fc"><i>application</i></span> "TextMate" <b>to</b> <span style="color: #3300fc"><b>open</b></span> <span style="color: #549213">ProjectFile</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>tell</b> <span style="color: #3300fc"><i>application</i></span> "TextMate" <b>to</b> <span style="color: #3300fc"><b>activate</b></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>tell</b> <span style="color: #3300fc"><i>application</i></span> "Finder" <b>to</b> <b>set</b> <span style="color: #549213">sourceFolder</span> <b>to</b> <span style="color: #3300fc"><i>folder</i></span> <b>of</b> <span style="color: #549213">ProjectFile</span> <b>as</b> <span style="color: #3300fc"><i>alias</i></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>tell</b> <span style="color: #3300fc"><i>application</i></span> "Finder" <b>to</b> <b>set</b> <span style="color: #549213">Subfolders</span> <b>to</b> <b>every</b> <span style="color: #3300fc"><i>folder</i></span> <b>of</b> <span style="color: #3300fc"><i>folder</i></span> <span style="color: #549213">sourceFolder</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; color: rgb(95, 97, 97); ">-- TODO: iterate through root folder and sub-sub-folders</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; min-height: 15px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; color: rgb(84, 146, 19); "><span style="color: #000000"><b>repeat</b> <b>with</b> </span>EachSubDir<span style="color: #000000"> <b>in</b> </span>Subfolders</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 78.5px; text-indent: -78.6px; font: normal normal normal 12px/normal Verdana; "><span class="Apple-tab-span" style="white-space:pre"> </span><b>tell</b> <span style="color: #3300fc"><i>application</i></span> "Finder" <b>to</b> <b>set</b> <span style="color: #549213">filesList</span> <b>to</b> (<b>every</b> <span style="color: #3300fc"><i>file</i></span> <b>in</b> <span style="color: #549213">EachSubDir</span> <b>whose</b> <span style="color: #8100d9">name</span> <b>ends with</b> ".html")</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 78.5px; text-indent: -78.6px; font: normal normal normal 12px/normal Verdana; color: rgb(84, 146, 19); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span><b>repeat</b> <b>with</b> </span>htmldatei<span style="color: #000000"> <b>in</b> </span>filesList</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 117.8px; text-indent: -117.8px; font: normal normal normal 12px/normal Verdana; "><span class="Apple-tab-span" style="white-space:pre"> </span><b>tell</b> <span style="color: #3300fc"><i>application</i></span> "TextMate" <b>to</b> <span style="color: #3300fc"><b>open</b></span> <span style="color: #549213">htmldatei</span> <b>as</b> <span style="color: #3300fc"><i>text</i></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 117.8px; text-indent: -117.8px; font: normal normal normal 12px/normal Verdana; color: rgb(95, 97, 97); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span></span>-- Wait one second to make sure the file is loaded</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 117.8px; text-indent: -117.8px; font: normal normal normal 12px/normal Verdana; color: rgb(36, 22, 187); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span></span><b>delay</b><span style="color: #000000"> 1</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 117.8px; text-indent: -117.8px; font: normal normal normal 12px/normal Verdana; "><span class="Apple-tab-span" style="white-space:pre"> </span><b>tell</b> <span style="color: #3300fc"><i>application</i></span> "System Events" <b>to</b> <span style="color: #3300fc"><b>keystroke</b></span> "u" <span style="color: #3300fc">using</span> {<span style="color: #5d2790">command down</span>, <span style="color: #5d2790">control down</span>}</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 117.8px; text-indent: -117.8px; font: normal normal normal 12px/normal Verdana; color: rgb(95, 97, 97); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span></span>-- Wait one second to make sure the update is finished</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 117.8px; text-indent: -117.8px; font: normal normal normal 12px/normal Verdana; color: rgb(36, 22, 187); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"> </span></span><b>delay</b><span style="color: #000000"> 1</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 78.5px; text-indent: -78.6px; font: normal normal normal 12px/normal Verdana; "><span class="Apple-tab-span" style="white-space:pre"> </span><b>end</b> <b>repeat</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>end</b> <b>repeat</b></div></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b><br></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>-- End of Apple Script</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b><br></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>When you run it, it prompts you for the tmproject-file and opens all html-Files in the subfolders.</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b><br></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>Has anyone a less ugly solution or any suggestion?</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b><br></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>Thanks</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b><br></b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b>Jan</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 39.2px; text-indent: -39.3px; font: normal normal normal 12px/normal Verdana; "><b><br></b></div></div><br>_______________________________________________<br>textmate mailing list<br><a href="mailto:textmate@lists.macromates.com">textmate@lists.macromates.com</a><br>http://lists.macromates.com/listinfo/textmate</blockquote></div><br></div></div></div></body></html>