Someone who is better at Python can probably clean this up / do a better 
job, but here is what I came up with. I'm also having a problem with my 
text filters inserting new lines all of a sudden... so that might need to 
be fixed too.

https://gist.github.com/andyguzman/7257334

Save that as a Text Filter. Then you can set up a key shortcut for it in 
the BBEdit or System Preferences, I believe.

I set a couple expected pairs, but you could add to that list. If you use a 
character that doesn't show up in that list it will just be used as is for 
the closing tag. I'm a super python novice and as such take no 
responsibility, etc. :-)

On Sunday, October 20, 2013 9:26:11 AM UTC-7, Oliver Taylor wrote:
>
> > On Oct 20, 2013, at 1:01 AM, Den Dowling <[email protected] <javascript:>> 
> wrote: 
> > 
> > Have you tried Clippings in BBEdit yet? 
>
> Oh yes, of course. 
>
> But I can't possibly anticipate all the characters I might want surround 
> the selection with. This script allows you to surround with anything the 
> user can think of. Plus, it would be a single hot-key for all surrounds, 
> which I like the idea of. 

-- 
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].

Reply via email to