Ben Maughan over at the excellent Pragmatic Emacs has a nice post about the wrap-region package. The idea is that you can arrange to wrap highlighted text with beginning and ending characters. For example, if you’re a C programmer you can arrange for /
to wrap the highlighted text in /*
and */
. If you’re an Org mode user, you can use it to add the markup characters such as /
, *
, =
, and ~
.
Take a look at Maughan’s post to see how it works and how to set up your own wrappings. As Maughan points out, this composes nicely with Magnar Sveen’s expand region package. If you often find yourself adding wrapping characters after the fact, this package may be a real help.
UPDATE: *\
→ */