"Find in Project" is a form of "find all", but I would like to see a better implemenation of this.
Basically, "Find All" would work on single and multiple files (as with BBedit's "Multi file search"), not just a project, and the results would be either the whole block as currently, or only the exact search term. Finally, I should be able to have the results appear in a new document, or at least be copy/pastable.
On 07/09/2005, at 23.37, Steve Weintraub wrote:
"Find in Project" is a form of "find all", but I would like to see a better implemenation of this.
It's on the to-do, but unlikely something I'll find the time to do anytime soon.
Anyone experienced with grep and find could actually create a replacement by doing a command with output set to HTML, which displays a (nice) form with a javascript function on submit, that runs the actual find :)
"Find in Project" is a form of "find all", but I would like to see a better implemenation of this.
It's on the to-do, but unlikely something I'll find the time to do anytime soon.
Sigh...okay.
Anyone experienced with grep and find could actually create a replacement by doing a command with output set to HTML, which displays a (nice) form with a javascript function on submit, that runs the actual find :)
That wouldn't be me...any takers? :)
On Sep 7, 2005, at 5:45 PM, Steve Weintraub wrote:
Anyone experienced with grep and find could actually create a replacement by doing a command with output set to HTML, which displays a (nice) form with a javascript function on submit, that runs the actual find :)
That wouldn't be me...any takers? :)
I'm experienced in all those technologies, but didn't understand what was being asked for. A grep (command-line, not built-in regexp) tool that spits out HTML that has a form with JS that...what?
On Sep 7, 2005, at 8:17 PM, Gavin Kistner wrote:
On Sep 7, 2005, at 5:45 PM, Steve Weintraub wrote:
Anyone experienced with grep and find could actually create a replacement by doing a command with output set to HTML, which displays a (nice) form with a javascript function on submit, that runs the actual find :)
That wouldn't be me...any takers? :)
I'm experienced in all those technologies, but didn't understand what was being asked for. A grep (command-line, not built-in regexp) tool that spits out HTML that has a form with JS that...what?
I think Allan's asking for an HTML-based Find dialog. The TextMate command would simply spit out the HTML form, and the embedded JavaScript would implement the actual find operation.
Chris
On Sep 7, 2005, at 6:41 PM, Chris Thomas wrote:
I think Allan's asking for an HTML-based Find dialog. The TextMate command would simply spit out the HTML form, and the embedded JavaScript would implement the actual find operation.
I suppose the part that's confusing me is how the JS performs a find operation...does the JS have access to run system commands?
On 08/09/2005, at 4.26, Gavin Kistner wrote:
I think Allan's asking for an HTML-based Find dialog. The TextMate command would simply spit out the HTML form, and the embedded JavaScript would implement the actual find operation.
I suppose the part that's confusing me is how the JS performs a find operation...does the JS have access to run system commands?
Yes -- from the release notes:
For HTML output a 'TextMate' javascript object is now exposed (property of window) with a system method that replicates the dashboard system method (in the 'widget' object). The method is documented here: http://developer.apple.com/documentation/AppleApplications/ Conceptual/Dashboard_Tutorial/Scripts/chapter_12_section_1.html.
In addition it also has an “isBusy” property which you can set to true/false to get the progress indicator. Here's a somewhat small example of a clock (using “date”) which needs you to start it first (for a version that allows you to stop the clock as well, see: http://macromates.com:3000/read/chapter/2#page13):
cat <<'EOF' <html><head><script> function start () { var cmd = "while true; do date; sleep 1; done"; var process = TextMate.system(cmd, function (task) { }); process.onreadoutput = function (str) { document.getElementById("date").innerText = str; }; } </script></head> <body><span id="start"> <a onClick="start()" href="#">Start</a></span> <div id="date"></div></body></html> EOF