Hi, regarding web development with TextMate and its web preview: I found the http://wiki.macromates.com/GUI/WebPreviewEnhancements page, and wondered if everything written there still applies, and if any workarounds exist, especially for the following two issues:
Don't close it when a different tab is selected in the TextMate main window
Add an option to refresh the Web Preview window if "any" file in the project has changed. This would be useful for anyone editing CSS files and wishes to see the changes immediately.
The lack of these two features unfortunately makes the preview rather useless when developing a new site from scratch while using a separate CSS file.
I'll add to these that AFAICT, when editing a long HTML page, the web preview goes back to the top each time it's refreshed, making it useless again if you're working on an area at the bottom of the page.
Am I missing anything? Thanks :).
My "Leopard Dark 2" GUI replacement http://wiki.macromates.com/Main/AlternativeGUIs does help a bit.
Also check out my subtleGradient.tmbundle on GitHub: http://github.com/subtleGradient/subtlegradient-tmbundle/tree/master
If you set up the subtlegradient.tmbundle/Support/bin/42_TextMate_live_preview.rb file as your filter through command in the web preview window you can get live html and CSS previews. You have to set the url to use for previewing css first. There's a command to do that for you too.
On Wed, Jul 2, 2008 at 4:40 PM, Marco De Vitis starless@spin.it wrote:
Hi, regarding web development with TextMate and its web preview: I found the http://wiki.macromates.com/GUI/WebPreviewEnhancements page, and wondered if everything written there still applies, and if any workarounds exist, especially for the following two issues:
Don't close it when a different tab is selected in the TextMate main window
Add an option to refresh the Web Preview window if "any" file in the project has changed. This would be useful for anyone editing CSS files and wishes to see the changes immediately.
The lack of these two features unfortunately makes the preview rather useless when developing a new site from scratch while using a separate CSS file.
I'll add to these that AFAICT, when editing a long HTML page, the web preview goes back to the top each time it's refreshed, making it useless again if you're working on an area at the bottom of the page.
Am I missing anything? Thanks :).
-- Ciao, Marco.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Il 3-07-2008 7:05, Thomas Aylott / subtleGradient ha scritto:
My "Leopard Dark 2" GUI replacement http://wiki.macromates.com/Main/AlternativeGUIs does help a bit.
Thanks, I installed it and it's cool ;), but in what regard does it help? You mean for having the same fonts as Safari in the web preview?
Also check out my subtleGradient.tmbundle on GitHub: http://github.com/subtleGradient/subtlegradient-tmbundle/tree/master
If you set up the subtlegradient.tmbundle/Support/bin/42_TextMate_live_preview.rb file as your filter through command in the web preview window you can get live html and CSS previews. You have to set the url to use for previewing css first. There's a command to do that for you too.
Uhm, I did it, and I think I found the command you mention, but I must be missing something. How should I proceed to get my HTML page preview while editing the related CSS? I tried opening the CSS, then the HTML in a different tab, then while on the HTML file selecting the "Use this page as the CSS preview" bundle command, but I get an error popup:
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/escape.rb:23:in `e_url': private method `gsub' called for nil:NilClass (NoMethodError) from /tmp/temp_textmate.44nGg5:5
Update the bundle and try again. I just fixed that error.
For best awesomeness you can set the variables $TM_PROJECT_SITEROOT and $TM_PROJECT_SITEURL so that if you're testing PHP or rails or something it'll preview through your server.
Also, you can manually add any random url you want into the file '/tmp/42_tm_css_live_preview_url.stupid_way_to_save_info'
I named the temp file that because I hadn't thought of anything else at the time and wanted to remind myself how stupid this method is. Still works though.
In the Web Preview window you can use variables in the path, so you could setup something like: "$HOME/Library/Application Support/TextMate/Bundles/subtleGradient.tmBundle/Support/bin/42_TextMate_live_preview.rb" if you have the bundle installed in "$HOME/Library/Application Support/TextMate/Bundles/"
huh, I wonder if you could set the preview command path to a variable and then set that variable dynamically. Could be a cool. I'll fiddle with it.
On Thu, Jul 3, 2008 at 10:34 AM, Marco De Vitis starless@spin.it wrote:
Il 3-07-2008 7:05, Thomas Aylott / subtleGradient ha scritto:
My "Leopard Dark 2" GUI replacement http://wiki.macromates.com/Main/AlternativeGUIs does help a bit.
Thanks, I installed it and it's cool ;), but in what regard does it help? You mean for having the same fonts as Safari in the web preview?
Also check out my subtleGradient.tmbundle on GitHub: http://github.com/subtleGradient/subtlegradient-tmbundle/tree/master
If you set up the subtlegradient.tmbundle/Support/bin/42_TextMate_live_preview.rb file as your filter through command in the web preview window you can get live html and CSS previews. You have to set the url to use for previewing css first. There's a command to do that for you too.
Uhm, I did it, and I think I found the command you mention, but I must be missing something. How should I proceed to get my HTML page preview while editing the related CSS? I tried opening the CSS, then the HTML in a different tab, then while on the HTML file selecting the "Use this page as the CSS preview" bundle command, but I get an error popup:
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/escape.rb:23:in `e_url': private method `gsub' called for nil:NilClass (NoMethodError) from /tmp/temp_textmate.44nGg5:5
-- Ciao, Marco.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Il 4-07-2008 17:16, Thomas Aylott / subtleGradient ha scritto:
Update the bundle and try again. I just fixed that error.
Er... I just did, and now the command seems to be successful, and the correct file:// URL is written in "/tmp/42_tm_css_live_preview_url.stupid_way_to_save_info", but when I open the CSS preview I still see the usual style preview... No, wait a minute: it works if I open the preview from the Window -> Show Web Preview menu item, but it doesn't work if I open it with the keyboard shortcut Ctrl-Option-Cmd-P. Weird.
Cool, and could be enough, but unfortunately it has the same problem you fixed in the "standard" web preview: if the preview of a long page is scrolled down, when I do some CSS edits the preview goes back to the top, forcing me to scroll it down again to check the changes.
Thanks.
Odd, it works for me. I open the web preview window, scroll to the bottom, update the css file, it refreshes and then scrolls itself back down.
Are you on leopard?
On Fri, Jul 4, 2008 at 7:29 PM, Marco De Vitis starless@spin.it wrote:
Il 4-07-2008 17:16, Thomas Aylott / subtleGradient ha scritto:
Update the bundle and try again. I just fixed that error.
Er... I just did, and now the command seems to be successful, and the correct file:// URL is written in "/tmp/42_tm_css_live_preview_url.stupid_way_to_save_info", but when I open the CSS preview I still see the usual style preview... No, wait a minute: it works if I open the preview from the Window -> Show Web Preview menu item, but it doesn't work if I open it with the keyboard shortcut Ctrl-Option-Cmd-P. Weird.
Cool, and could be enough, but unfortunately it has the same problem you fixed in the "standard" web preview: if the preview of a long page is scrolled down, when I do some CSS edits the preview goes back to the top, forcing me to scroll it down again to check the changes.
Thanks.
-- Ciao, Marco.
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Il 5-07-2008 17:16, Thomas Aylott / subtleGradient ha scritto:
Odd, it works for me. I open the web preview window, scroll to the bottom, update the css file, it refreshes and then scrolls itself back down.
Are you on leopard?
Yes, 10.5.4. Just to be sure: HOW do you open the web preview window? From a menu item, or using a key combo? And you open it while you are on the CSS file, right?
On Jul 5, 2008, at 5:39 PM, Marco De Vitis wrote:
Il 5-07-2008 17:16, Thomas Aylott / subtleGradient ha scritto:
Odd, it works for me. I open the web preview window, scroll to the bottom, update the css file, it refreshes and then scrolls itself back down.
Are you on leopard?
Yes, 10.5.4. Just to be sure: HOW do you open the web preview window? From a menu item, or using a key combo? And you open it while you are on the CSS file, right?
-- Ciao, Marco.
I open it with the Window menu... while viewing the CSS file.
Il 6-07-2008 0:46, Thomas Aylott - subtleGradient ha scritto:
I open it with the Window menu... while viewing the CSS file.
Uhm, that's strange, I tried again and noticed that it doesn't work for the file I was testing, while it works for another one. Who knows.
Great anyway, thanks ;).
I was just wondering why the official bundles for html and css are so… basic (with all the due respect for their maintainers, of course). I am using the html and css bundles from Minimal Design( http://minimaldesign.net/downloads/tools ), I think, in my opinion, that those are a way better then official ones. So, why aren't them the official TM html and css bundles?
Giuseppe Caruso
(((Bonsai Studio))) Professional Rapidweaver themes and Web sites
Little Oak Hosting LLC A small company with a hands on personal approach!
I'm currently working on a majorly improved version of the css and javascript bundles. I'm mostly focusing on the language stntaxes and code completion. I'll take another look at those bundles you mention and see if some of it should be included in the official bundle.
Iirc it was awesome stuff. Thanks for the reminder about them. -- Thomas Aylott / SubtleGradient (from iPhone)
On Aug 4, 2008, at 5:26 PM, "(((Bonsai Studio))) - Giuseppe" <giuseppe@bonsai-studio.net
wrote:
<bonsai-studio-logo.png> I was just wondering why the official bundles for html and css are s o… basic (with all the due respect for their maintainers, of course). I am using the html and css bundles from Minimal Design( http://minimaldesign.net/downloads/tools ), I think, in my opinion, that those are a way better then official ones. So, why aren't them the official TM html and css bundles?
Giuseppe Caruso
(((Bonsai Studio))) Professional Rapidweaver themes and Web sites
Little Oak Hosting LLC A small company with a hands on personal approach!
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Grazie Thomas, :) They are really well done. I hope to get them joined with official bundles, they would become almost perfect.
I apologize for having posted in the wrong thread, I was sure I had made a new post.
Il giorno 05/ago/08, alle ore 14:27, Thomas Aylott / subtleGradient ha scritto:
I'm currently working on a majorly improved version of the css and javascript bundles. I'm mostly focusing on the language stntaxes and code completion. I'll take another look at those bundles you mention and see if some of it should be included in the official bundle.
Iirc it was awesome stuff. Thanks for the reminder about them. -- Thomas Aylott / SubtleGradient (from iPhone)
On Aug 4, 2008, at 5:26 PM, "(((Bonsai Studio))) - Giuseppe" <giuseppe@bonsai-studio.net
wrote:
<bonsai-studio-logo.png> I was just wondering why the official bundles for html and css are so… basic (with all the due respect for their maintainers, of course). I am using the html and css bundles from Minimal Design( http://minimaldesign.net/downloads/tools ), I think, in my opinion, that those are a way better then official ones. So, why aren't them the official TM html and css bundles?
Giuseppe Caruso
(((Bonsai Studio))) Professional Rapidweaver themes and Web sites
Little Oak Hosting LLC A small company with a hands on personal approach!
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate