A couple of days ago I checked in a new CSS bundle command for doing a preview. You can find this in the macromates.com subversion repository:
http://anon:anon@macromates.com/svn/Bundles/trunk/Bundles/ CSS.tmbundle/Commands/Preview.plist
The goal was to generate a preview HTML page from the CSS rules declared. It's not perfect, but it's a first stab at it. I've seen similar functionality in TopStyle (for Windows) and a single-item preview in CSSEdit (for Mac). The command is bound to Ctrl+Option+Cmd +P. Note that since it is scoped to source.css, hitting this key within an HTML document with the caret inside a CSS block will also invoke the CSS Preview. If this happens, it will submit the contents of the CSS block as the input to the command (using the new 'Scope' input option). The command also works on a selection; so if you have a few CSS rules you want to preview, you can select them first.
Feedback as always is appreciated-- there are still some rough edges (ie, how to handle absolute-positioned rules or floats), but it's pretty useful to me already.
-Brad
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On May 12, 2006, at 11:17 AM, Brad Choate wrote:
[...]
Feedback as always is appreciated
Brad your previewer is great and so far working well for me. I am using it to craft css 1, 2 and 3 style sheets for use with prince and this makes it extremely convenient. Thanks for the work, i'll let you know if I find problems.
Robert
On 12.05.2006, at 20:17, Brad Choate wrote:
A couple of days ago I checked in a new CSS bundle command for doing a preview. You can find this in the macromates.com subversion repository:
http://anon:anon@macromates.com/svn/Bundles/trunk/Bundles/ CSS.tmbundle/Commands/Preview.plist
... Feedback as always is appreciated-- there are still some rough edges (ie, how to handle absolute-positioned rules or floats), but it's pretty useful to me already.
Hey Brad. It won't work for files inside projects for me? While when I copy all the text to a new file it works. But then when I save that file, it acts funny and does not really work any more. Are you relying on temp file names?
Soryu.
Nope, no temp files involved-- except the one TM probably stores the file to when it displays it in the HTML window. It seems to be working for me, regardless of whether I run it on a project file, a new (unsaved) file, or a saved individual file. Can you send me a CSS file that exhibits the problem you're seeing?
On May 12, 2006, at 12:52 PM, Soryu wrote:
On 12.05.2006, at 20:17, Brad Choate wrote:
A couple of days ago I checked in a new CSS bundle command for doing a preview. You can find this in the macromates.com subversion repository:
http://anon:anon@macromates.com/svn/Bundles/trunk/Bundles/ CSS.tmbundle/Commands/Preview.plist
... Feedback as always is appreciated-- there are still some rough edges (ie, how to handle absolute-positioned rules or floats), but it's pretty useful to me already.
Hey Brad. It won't work for files inside projects for me? While when I copy all the text to a new file it works. But then when I save that file, it acts funny and does not really work any more. Are you relying on temp file names?
Soryu.
Hi All,
While CVS access is nice, it's not really - honestly! - the most userfriendly way to get more users to download the stuff.
Might I be so bold as to suggest that tmbundles could be made available, say, in tarball's or gzip files, so we don't have to 'check out' the repository are a sub-part of it, just to try out a new bundle?
I know, I know - it's not as geeky as the cvs checkout, but it would raise the audience quite a bit towards the rooftop, if you ask Slartibarfast... ;-)
All the best,
Jakob Peterhänsel
"Be a part of the Love Generation - carry a smile, not a gun." - JP, May 2006
Email: jakob@hjemme.dk AIM: Marook Phone: +45 22684961
On 12/05/2006, at 20:17, Brad Choate wrote:
Feedback as always is appreciated
On 13/5/2006, at 9:09, Andreas Wahlin wrote:
Please, zip-files for the geekily-challenged.
The reason I do not provide zips for bundles is that TextMate auto- install bundles in ~/Library and has no merging capabilities.
So if for example a user were to download the updated CSS bundle (with the recent Preview command), installing it would overwrite all changes he may have done to the CSS bundle, and, when TextMate gets updated, he won’t see updates to existing items in the CSS bundle because he now has a local copy which eclipse it.
So before TM gets a) ability to install into /Library, b) better merging capabilities of bundles, and c) a “Revert to Default” in the bundle editor, I think it’s a bad idea to provide zipped versions of at least the default bundles.
You guys will find Brad’s CSS Preview command in the next build of TextMate. And the “Source to HTML” currently in the Experimental bundle will find its way into the default bundles.
On May 13, 2006, at 1:21 AM, Allan Odgaard wrote:
On 13/5/2006, at 9:09, Andreas Wahlin wrote:
Please, zip-files for the geekily-challenged.
The reason I do not provide zips for bundles is that TextMate auto- install bundles in ~/Library and has no merging capabilities.
I don't think they were asking for zips of individual bundles; they just wanted a way to download bundles that didn't require knowledge of Subversion. For instance, could a nightly tarball of the bundle repository be provided?
Trevor
For those that need it, here's a zip file of the single CSS Preview command.
On May 13, 2006, at 9:13 AM, Trevor Harmon wrote:
On May 13, 2006, at 1:21 AM, Allan Odgaard wrote:
On 13/5/2006, at 9:09, Andreas Wahlin wrote:
Please, zip-files for the geekily-challenged.
The reason I do not provide zips for bundles is that TextMate auto- install bundles in ~/Library and has no merging capabilities.
I don't think they were asking for zips of individual bundles; they just wanted a way to download bundles that didn't require knowledge of Subversion. For instance, could a nightly tarball of the bundle repository be provided?
Trevor
The reason I do not provide zips for bundles is that TextMate auto- install bundles in ~/Library and has no merging capabilities.
Ah, very good reasons.
You guys will find Brad’s CSS Preview command in the next build of TextMate. And the “Source to HTML” currently in the Experimental bundle will find its way into the default bundles.
Well then, I'll just wait a bit. Good.
Andreas
The instructions for updating via subversion are simply two command lines that need to be copied verbatim in the terminal. See http:// macromates.com/textmate/manual/bundles#getting_more_bundles
Installing subversion can be done via the file at: http://metissian.com/projects/macosx/subversion/ This link is the third bullet item in the Installing subversion section of the macromates manual. Don't do the Fink or Darwin ports install. Just follow the link above and download the Universal binary dmg file. It installs just like any other OS X dmg application.
Zero knowledge of subversion is required to cut and paste the command lines. The first command line simply changes to the correct directory and the second command does the subversion call. I realize that issuing commands in the terminal is a bit intimidating for someone who has never done this before. But once you've done it once and see that it works as expected, you will not desire zipped files anymore. give it a try, ke han
On May 14, 2006, at 6:05 PM, Andreas Wahlin wrote:
The reason I do not provide zips for bundles is that TextMate auto- install bundles in ~/Library and has no merging capabilities.
Ah, very good reasons.
You guys will find Brad’s CSS Preview command in the next build of TextMate. And the “Source to HTML” currently in the Experimental bundle will find its way into the default bundles.
Well then, I'll just wait a bit. Good.
Andreas ______________________________________________________________________ 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