1

I'm tired of typing #+begin_quote and the other one manually (couldn't type it, too tired). Is there a way to surround a region with this? I can't help but feel like there must already be a function for it that I just have to bind to some keystroke.

I'm a new emacs (spacemacs) user, using the vim keybindings, if that makes any difference.

1 Answer 1

2

Not sure if the same works on spacemacs, but it's worth trying: there is a set of predefined abbrevs in org-mode where you type

<q<TAB>

i.e. the '<' char, the q char and the TAB char which is expanded to

#+BEGIN_QUOTE

#+END_QUOTE

with the cursor left in between the two lines. For other abbreviations like this, check out the documentation of the variable org-structure-template-alist. The documentation of this feature can be found here.

2
  • 1
    Sweet, that's just the kind of thing I was looking for. It'd be nicer if it handled ranges, that is, be able to add that around a selected passage, but it works for now.
    – Jonathan
    Commented May 1, 2017 at 14:33
  • Unfortunately, it does not handle a region AFAICT. When I want to surround a region, I use this mechanism to insert an empty template just before the region and then move the #+END part to the end of the region manually, by killing and yanking.
    – NickD
    Commented May 2, 2017 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.