wrap-with-anything
Wrap text selections instead of replacing them when certain characters are typed.
The Atom builtin package bracket-matcher
provides a feature where if you have
text selected and type any kind of opening bracket or quote, the selection is
wrapped instead of being replaced.
This package (wrap-with-anything) extends this feature to allow an arbitrary
list of characters which will trigger this wrapping behaviour. The default list
is *
, ~
, /
, _
, and space.
Char | Reason |
---|---|
* |
Mardown emphasis (single) and strong emphasis (double) |
_ |
Mardown emphasis (single) and strong emphasis (double) |
~ |
Mardown |
/ |
Used for italics in various markups. Also delimits regular expressions in many languages |
(space) | Useful for padding things out |
You can customise this list in the settings.