Snippet to add tags to current selection?


I’m transitioning from BBEdit. One of the things I miss is the ability to add tags to the current selection. So, if I type ctrl-b while I have text selected, I get <b>[current selection]</b>.

I’d especially like it if it were able to used either markdown or html, depending on the document type.

The html and md packages I can find all seem to focus on autocomplete, rather than wrapping the current selection.

I’d be happy to make these for myself, but I can’t find any examples to follow.

Edit: Changed key binding to snippet, which is, upon reflection, what I think I’m looking for.


This is essentially a duplicate of:

We like to unify similar discussions under one topic so that people don’t have to read a bunch of different threads to get the whole story. Please continue the discussion there. I’ll be closing this topic as duplicate.

I’m pretty certain there are packages that achieve this now for HTML. Not so sure about Markdown yet.

closed #3

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.