Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
I worked out a solution for BBEdit and TextWrangler using AppleScript and some tweaking of the existing Python. I have some updates to do in the following days, but seems very usable in its current state. You can check it out at my site, http://www.angelwatt.com/coding/zen-coding_bbedit.php It's also linked to from the Zen Coding home page at Google Code, but the files are only hosted at my site for now. My planned updates are to upgrade to the latest core and then also adding inline expansion support rather than relying on AppleScript prompt box for abbreviation entry. ~angelwatt On Nov 22, 11:35 am, Jean-Michel Mermet jeanmichel.mer...@gmail.com wrote: I'm very interested by the following article : Zen Coding: A Speedy Way To Write HTML/CSS Code athttp://www.smashingmagazine.com/2009/11/21/zen-coding-a-new-way-to-wr... I see no BBEdit version. Do you think our favorite text processor is powerful enough to have such a wonderful add-on ??? Thanks for your answer ! -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.
Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
I did see your script and had tried it out. One big advantage my script brings is that it can wrap selected text with an abbreviation. Yours doesn't seem to be able to handle that. Also, my script inserts the expanded text as a Clipping and makes use of the placeholders so you can tab to the next edit point as you do with the clippings BBEdit comes with. You can download my scripts and give them a try. All the source code is with them too so you can see what I'm up to. On Dec 17, 8:20 pm, Charlie Garrison garri...@zeta.org.au wrote: Good afternoon, Did you see the script I sent to this list a few weeks back? The script I supplied already works without requiring an AppleScript dialog. Just select the abbreviation and run the zencoding script (via key shortcut). What was not working was the auto-complete behaviour; script requires text to be selected rather than just looking for 'word' that is before the insertion point. I asked for some support from any list memeber to help with just the auto-complete behaviour, and the script would be functionally complete. So, is your script doing something that mine is not doing? Or is it just a duplication of effort? There is no point in there being two functionally equivalent scripts; it will just muddy the waters for BBEdit users. We should merge our efforts. Charlie -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.
Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
At 08.59 +1100 2009-11-28, Charlie Garrison wrote: That's my problem too. I couldn't find any 'good' code for finding the text for auto-completion. I would have the ability to write the code, but not the time. If anyone can supply code for handling the auto completion (finding text/word before insertion point) then finishing off the Zen Coding script should be easy. Would it be of any use to look at BBAutoComplete? It has applescript based glue. http://c-command.com/bbautocomplete/ -- Johan Sölve[FSA Member, Lasso Partner] Web Application/Lasso/FileMaker Developer MONTANIA SOFTWARE SOLUTIONS http://www.montania.se mailto:jo...@montania.se (spam-safe email address, replace '-' with 'a') -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.
Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
Good morning, On 28/11/09 at 10:05 PM +0100, Johan Solve inbox...@solve.se wrote: Would it be of any use to look at BBAutoComplete? It has applescript based glue. http://c-command.com/bbautocomplete/ I did already. It seems to have the auto-complete smarts within the BBAutoComplete app rather than the glue scripts. But due to lack of time I didn't study it for long. There could be a clue in there. Charlie -- Ꮚ Charlie Garrison ♊ garri...@zeta.org.au 〠 PO Box 141, Windsor, NSW 2756, Australia O ascii ribbon campaign - stop html mail - www.asciiribbon.org http://www.ietf.org/rfc/rfc1855.txt -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.
Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
Good morning, On 26/11/09 at 1:03 PM -, Carlton Gibson carlton.gib...@gmail.com wrote: My main problem is my AppleScript is really bad -- I'm getting there but it takes time -- In particular, I'm having to basically trial-and-error my way around insertion points and selections and character offsets and line beginning and ends. To wit: do any of the AppleScript Gurus know of a good primer/set of examples which cover the obvious cases here? -- (I managed to get moderately comfortable with scripting searches via the examples in the BBEdit manual and similar for selections and insertion point manipulation would really enable me to push forward.) That's my problem too. I couldn't find any 'good' code for finding the text for auto-completion. I would have the ability to write the code, but not the time. If anyone can supply code for handling the auto completion (finding text/word before insertion point) then finishing off the Zen Coding script should be easy. Charlie -- Ꮚ Charlie Garrison ♊ garri...@zeta.org.au 〠 PO Box 141, Windsor, NSW 2756, Australia O ascii ribbon campaign - stop html mail - www.asciiribbon.org http://www.ietf.org/rfc/rfc1855.txt -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.
Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
Good evening, On 25/11/09 at 5:09 AM -0800, jmmermet jeanmichel.mer...@gmail.com wrote: I totally agree ! You're not clear what you're agreeing with. I'm guessing you agree BBEdit should be able to work with Zen Coding. Do you know any Python or AppleScript? Are you able to contribute to the script conversion I started and get the proper auto-completion working? I'm sure with the effort of a few people from this list we could get the script working very smoothly from within BBEdit. Anyone willing to help? Charlie -- Ꮚ Charlie Garrison ♊ garri...@zeta.org.au 〠 PO Box 141, Windsor, NSW 2756, Australia O ascii ribbon campaign - stop html mail - www.asciiribbon.org http://www.ietf.org/rfc/rfc1855.txt -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.
Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
On 26 Nov 2009, at 12:08, Charlie Garrison wrote: I'm sure with the effort of a few people from this list we could get the script working very smoothly from within BBEdit. Anyone willing to help? Yes, I'm willing to help. As a slight preamble... I've created the first version of a Code Sense tool for BBEdit -- for a variable referencing an object it will provide a list of the object's methods and autocomplete the method with parameter placeholders. This works for PHP at the moment. I intend to release it via GitHub next week -- I just need the time to package it up and document it. -- I was hoping to get feedback and input for making it more intelligent and adding more languages. (Currently it works via a special comment which is not ideal; first on my list is javascript.) Directly related to this thread... I'm using AppleScript to handle the selection issues -- in particular using a scripted search enables you to not need to highlight the selection you're after as you need to with a UNIX Filter. I'm sure similar could be employed to work with the Zen Coding package. My main problem is my AppleScript is really bad -- I'm getting there but it takes time -- In particular, I'm having to basically trial-and-error my way around insertion points and selections and character offsets and line beginning and ends. To wit: do any of the AppleScript Gurus know of a good primer/set of examples which cover the obvious cases here? -- (I managed to get moderately comfortable with scripting searches via the examples in the BBEdit manual and similar for selections and insertion point manipulation would really enable me to push forward.) Thanks in advance. :-) Regards, Carlton -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.
Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
I totally agree ! On 24 nov, 15:22, stratboy em...@reghellin.com wrote: To the devs: I think you should REALLY manage to implement a stable plugin for this in the next imminent bbedit plugin. As long as maybe some other good plugin, and complete language modules (actionscript 3.0 still isn't really complete!!! How is it possible?) HTML editors war is really still alive, with Coda, Aptana and the new player Espresso really fighting against. :) I've always used bbedit, but i'm more and more tempted by the three mentioned. And that said, Coda is by far the most used html editor at this time, maybe there are some reasons. So, fight more, fight harder, I want still continue to use bbedit, but you must be the best, since you by far are the most expensive! :) -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.
Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
Thanks a lot for this ! I tried many examples from the original article and it seems to be OK ... but, as someone else mentioned, it lacks autocompletion and the position of the cursor after the expansion. Thanks again On 23 nov, 06:48, Charlie Garrison garri...@zeta.org.au wrote: Good afternoon, On 22/11/09 at 5:35 PM +0100, Jean-Michel Mermet jeanmichel.mer...@gmail.com wrote: I'm very interested by the following article : Zen Coding: A Speedy Way To Write HTML/CSS Code at http://www.smashingmagazine.com/2009/11/21/zen-coding-a-new-way-to-wr... I see no BBEdit version. Do you think our favorite text processor is powerful enough to have such a wonderful add-on ??? Of course it is. The attached is more a proof of concept, I don't know python well enough to finish it off. I've taken the TextMate Zen Coding plugin as a starting point. (There could be copyright/licensing issues with me sharing code here, but I couldn't see anything obvious.) Hopefully some of the Python folks can polish off the script. Right now it requires the abbreviation to be selected, and the script is triggered as a Unix Filter from BBEdit. I'd like to see the script extended to work more like the good ole BBAutoComplete which would find the 'just typed' text and replace it. Any python coders keen to do that. I would think the script could switch from being Unix Filter to an AppleScript so the selection can be munged. Anyway, the idea of Zen Coding is intriguing enough to me that I had to see it working in BBEdit. Enjoy. Install the attached in your BBEdit Unix Filters, assign a key shortcut and start some zen coding. Charlie -- Ꮚ Charlie Garrison ♊ garri...@zeta.org.au 〠 PO Box 141, Windsor, NSW 2756, Australia O ascii ribbon campaign - stop html mail -www.asciiribbon.orghttp://www.ietf.org/rfc/rfc1855.txt zencoding.zip 17KAfficherTélécharger -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.
Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
On Nov 22, 2009, at 4:35 PM, Jean-Michel Mermet wrote: I'm very interested by the following article : Zen Coding: A Speedy Way To Write HTML/CSS Code at http://www.smashingmagazine.com/2009/11/21/zen-coding-a-new-way-to-write-html-code but I see no BBEdit version. Do you think our favorite text processor is powerful enough to have such a wonderful add-on ??? Thanks for your answer ! That's pretty cool. Certainly the basic approach could be implemented via Clippings + AppleScript. I'm too busy to do that right now, but you can find an example of how to do something similar by looking at the date function of the PHP clipping set: http://github.com/tedmasterweb/bbeditclippings/blob/master/Clipping%20Sets/PHP.php/Functions/date (and then at the AppleScript it executes) http://github.com/tedmasterweb/bbeditclippings/tree/master/Clipping%20Sets/PHP.php/Support%20Files/ Ted Stresen-Reuter -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.
Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
Charlie, Really great stuff here! As far as polishing the Python code, I'm at a loss. But I see that customizing/expanding the returned snippets is easy. For example, the html snippet returns with lang=ru but can be revised to be whatever lang is appropriate for your work. Look into the file: zencoding/ settings.py Thanks for sharing. Thom. On Nov 23, 12:48 am, Charlie Garrison garri...@zeta.org.au wrote: Enjoy. Install the attached in your BBEdit Unix Filters, assign a key shortcut and start some zen coding. -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.
Re: Zen Coding: A Speedy Way To Write HTML/CSS Code
Hey Jean-Michel, Thanks for this information! --On Sunday, November 22, 2009 05:35:23 PM +0100 Jean-Michel Mermet jeanmichel.mer...@gmail.com wrote: Do you think our favorite text processor is powerful enough to have such a wonderful add-on ??? Thanks for your answer ! I don't use BBEdit any more for my daily work, but I still watch this list, and I am so glad that I did! This is a very interesting idea, and I believe this could be worked into my current editor and workflow with relative ease. I could probably provide a set of utilities to achieve this result for BBEdit to a limited extent as well. I already do some of this because I write in SXML instead of HTML, which is a nicer nested expression syntax, and reduces a lot of the typing, but some of this would help that even more. Again, thanks for sharing! Aaron W. Hsu -- You received this message because you are subscribed to the BBEdit Talk discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email supp...@barebones.com rather than posting to the group.