Howdy.
Enjoy instant-ish feedback!!!!1! http://textmate.svn.subtlegradient.com/Support/bin/ 42_TextMate_live_preview.rb
Put the full path to that file in the Pipe text through box in the Web Preview Window  For CSS, it'll ask you to open a file and paste a test-url in there. It completely replaces all links to css files with the css you're previewing, AS YOU TYPE!!!1!
For HTML, it inserts a base tag with the TM_PROJECT_SITEURL
For Rails Views, it redirects the page to the saved version via your TM_PROJECT_SITEURL. Just try it out, you may hate it ;).
For markdown and textile, it renders it as markdown or textile. Never worry about changing your filter script!
For all other source files, it does a live diff between the saved and unsaved version. No coloring of anything fancy, but handy (yes, i know all about the diff bundle).
For everything else, it does nothing special, yet.
I tried t do this a while ago but i couldn't make it work. Turns out that only a few TM specific variables were being set. Allan has since fixed that.
Personally, I think this script is really stupid and unnecessary. But extremely handy as a stopgap until we get something that is supposed to replace this.
Basically, if we had a way to make ANY command rerun itself or refresh after change, then this filter would be totally unnecessary and we could make each of these things a separate refresh-after- change command. Allan, add it to the list?
enjoy
Also! If anybody has any improvement suggestions, suggest away! I'm all for it. I only knocked this thing together last night when i should have been sleeping. Most things are not done the best way. Feel free to improve or replace. Enjoy!
thomas Aylott—subtleGradient
For some strange reason, I can't activate the "Pipe text through" checkbox. Any hints? Cheers. Oliver
On 11.06.2006, at 15:29, thomas Aylott wrote:
Howdy.
Enjoy instant-ish feedback!!!!1! http://textmate.svn.subtlegradient.com/Support/bin/ 42_TextMate_live_preview.rb
Put the full path to that file in the Pipe text through box in the Web Preview Window <pastedGraphic.png>
For CSS, it'll ask you to open a file and paste a test-url in there. It completely replaces all links to css files with the css you're previewing, AS YOU TYPE!!!1!
For HTML, it inserts a base tag with the TM_PROJECT_SITEURL
For Rails Views, it redirects the page to the saved version via your TM_PROJECT_SITEURL. Just try it out, you may hate it ;).
For markdown and textile, it renders it as markdown or textile. Never worry about changing your filter script!
For all other source files, it does a live diff between the saved and unsaved version. No coloring of anything fancy, but handy (yes, i know all about the diff bundle).
For everything else, it does nothing special, yet.
I tried t do this a while ago but i couldn't make it work. Turns out that only a few TM specific variables were being set. Allan has since fixed that.
Personally, I think this script is really stupid and unnecessary. But extremely handy as a stopgap until we get something that is supposed to replace this.
Basically, if we had a way to make ANY command rerun itself or refresh after change, then this filter would be totally unnecessary and we could make each of these things a separate refresh-after- change command. Allan, add it to the list?
enjoy
Also! If anybody has any improvement suggestions, suggest away! I'm all for it. I only knocked this thing together last night when i should have been sleeping. Most things are not done the best way. Feel free to improve or replace. Enjoy!
thomas Aylott—subtleGradient
<pastedGraphic.png>
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
If anyone's interested: I got this solved. It was the WebMate plugin which prevented me from checking the box. Oliver
On 12.06.2006, at 12:24, Oliver Hagmann wrote:
For some strange reason, I can't activate the "Pipe text through" checkbox. Any hints? Cheers. Oliver
On 11.06.2006, at 15:29, thomas Aylott wrote:
Howdy.
Enjoy instant-ish feedback!!!!1! http://textmate.svn.subtlegradient.com/Support/bin/ 42_TextMate_live_preview.rb
Put the full path to that file in the Pipe text through box in the Web Preview Window <pastedGraphic.png>
For CSS, it'll ask you to open a file and paste a test-url in there. It completely replaces all
On Jun 12, 2006, at 8:10 AM, Oliver Hagmann wrote:
If anyone's interested: I got this solved. It was the WebMate plugin which prevented me from checking the box. Oliver
The WebMate plugin sometimes does some strange things with the window when you close it. Cool plugin though
thomas Aylott—subtleGradient
On Jun 11, 2006, at 15:29, thomas Aylott wrote:
Enjoy instant-ish feedback!!!!1! http://textmate.svn.subtlegradient.com/Support/bin/ 42_TextMate_live_preview.rb
I love this thing, but I have some problems with lag/lost keystrokes/ spinning ball when i edit the file I'm previewing. I have played with the refresh-settings, but they doesn't seem to fix the problem.
-- Knut Erik Andersen (tenthumbs on IRC)
On 12/6/2006, at 18:16, Knut Erik Andersen wrote:
Enjoy instant-ish feedback!!!!1! http://textmate.svn.subtlegradient.com/Support/bin/ 42_TextMate_live_preview.rb
I love this thing, but I have some problems with lag/lost keystrokes/spinning ball when i edit the file I'm previewing. I have played with the refresh-settings, but they doesn't seem to fix the problem.
Ah, I believe this is the new way TM handles command execution -- since now it will respond to (most) events while executing a command, it means key presses are dropped.
I do plan to run this preview thing async. [1], which would solve the problem -- for now though, there isn’t much to do to avoid the lost key presses.
[1] I also plan that reload thing of commands with HTML output mentioned earlier in the thread…
On Jun 12, 2006, at 12:38 PM, Allan Odgaard wrote:
On 12/6/2006, at 18:16, Knut Erik Andersen wrote:
Enjoy instant-ish feedback!!!!1! http://textmate.svn.subtlegradient.com/Support/bin/ 42_TextMate_live_preview.rb
I love this thing, but I have some problems with lag/lost keystrokes/spinning ball when i edit the file I'm previewing. I have played with the refresh-settings, but they doesn't seem to fix the problem.
Ah, I believe this is the new way TM handles command execution -- since now it will respond to (most) events while executing a command, it means key presses are dropped.
An excellent new feature!, btw
I do plan to run this preview thing async. [1], which would solve the problem -- for now though, there isn’t much to do to avoid the lost key presses.
I was just about to propose that, but have no idea what it would take to do that. Maybe i'll do something to speed it up in the mean time. Any suggestions? Would a regular bash script be faster then ruby? Would it help if I didn't write it in an incredibly crappy way?
[1] I also plan that reload thing of commands with HTML output mentioned earlier in the thread…
You've just made my day, again.
thomas Aylott—subtleGradient