Thanks Dennis. This definitely helps. I wasn't aware of the cursor- context-based switching. I'll try doing it this way.
Peter On Nov 10, 2008, at 10:48 AM, Dennis wrote: > > On Nov 10, 2008, at 7:01 AM, Peter Weil wrote: > >> Language-wise, I work almost >> exclusively with html, php, and css. Because php is often embedded in >> html, I usually need all of my php and html clippings available at >> the >> same time. In other words, I'd rather not have to switch clippings >> sets while I'm working on either .html or .php files. > > BBEdit 9 automatically switches your clipping set depending on the > context of your cursor. For example, if you have an HTML file with > embedded CSS in <style> tags or PHP code in <?php… ?> tags, BBEdit > will switch to the CSS and PHP clipping sets automatically when you > place you cursor between those tags. And it'll also switch back to > HTML when you move your cursor outside of the CSS and PHP sections. > > So I keep my CSS, PHP, and HTML sets in separate clippings folders > with .css, .php, and .html extensions respectively (BBEdit uses these > extensions to match up clipping sets with the current source > language). Also, be sure to have the "Change clippings set to match > document's language" setting enable under the Languages preference > pane. > > >> Under suffix mappings in Preferences, I have .php mapped to html. I >> can't remember whether this is set by default or whether I set this. > > > Yes, by default .php is be mapped to HTML. That will give you what you > want 99.9% of the time. > > The only case I've found where it doesn't is when I'm dynamically > generating XML with PHP. Having an opening XML tag (<?xml > version="1.0" encoding="utf-8"?>) embedded in a PHP echo statement > seems to confuse the language parser when it's set to HTML. The > workaround seems to be to manually set it to PHP, which is fine for me > since the files are typically pure PHP anyway rather than PHP embedded > in HTML. > > Hope this helps. > > -Dennis > > -- Peter Weil, Web Developer University Communications University of Wisconsin-Madison Phone: 608-262-6538 Email: [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a specific feature request or would like to report a suspected (or confirmed) problem with the software, please email to "[EMAIL PROTECTED]" rather than posting to the group. -~----------~----~----~----~------~----~------~--~---
