Hi Brian, A while back I wrote a little AppleScript to make options within placeholders a little more useful. https://github.com/ollicle/BBEdit-Extract-Placeholder
Interested in your feedback. Cheers Ollie On 9 July 2016 at 01:55, Brian Christiansen <[email protected]> wrote: > Folks, > > I've used the <##> placeholder in BBEdit for years. I'm wondering if I am > getting everything I can out of it. For example, > > Every few months, I have to fill in a YAML document with strings of text > (HTML and or MD, sometimes mixed). I delete the YAML values of a prior > document, and put placeholders in their place. Then I load up my clipboard > manager with let's say 10 strings (textual content to be displayed on a web > site) of materials from their source (usually a Google Doc), and I tab > through the placeholders and paste in the strings. (the formatting changes > every few months, so scripting this is not something I'm going to attempt) > > Sometimes, the items I have to edit, though, aren't these random content > strings, but instead one of two options, e.g. "Monday" vs "Wednesday". I've > been marking those with <#Monday|Wednesday#>. Is there a way through the > keyboard to say to BBEdit "Please replace this placeholder with the first > of the two options in the placeholder", e.g., "Make this instance of > `<#Monday|Wednesday#>` become `Monday`. > > All the time I've used placeholders, I've always felt like there is more > waiting for me to unlock with them… but couldn't glean anything from the > manual on how to take them to the next level. This comes up a lot with CSS > clippings too. E.g. `line-height: <#normal|15px|2em#>;` —ideally in this > situation, I want to tap a trigger key to highlight the placeholder, then a > second trigger to select one of the 3 options (`2em`) and have my cursor > select the value (`2`) so I could overwrite it, and then a final trigger to > close the operation which hops the cursor to the right of the semi-colon. > > Any thoughts on placeholders? Am I totally missing something? Have the > absolute wrong expectations? Call me a dreamer? > > Thanks, > ~brian > > -- > This is the BBEdit Talk public discussion group. If you have a > feature request or would like to report a problem, please email > "[email protected]" rather than posting to the group. > Follow @bbedit on Twitter: <http://www.twitter.com/bbedit> > > --- > You received this message because you are subscribed to the Google Groups > "BBEdit Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > -- This is the BBEdit Talk public discussion group. If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
