Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using org-mode for organizing myself (very useful so far!). However, it is kind of annoying writting


each time I'd like to insert an environment.


Is there a shortcut to insert the #+begin_ and #+end_ for a given environment?

In the same way C-c C-o comment RET would insert



in latex-mode.

share|improve this question
Do you have the package yasnippet installed? – lawlist Oct 2 '13 at 20:33
This question is a duplicate of – Francesco Oct 2 '13 at 21:28
up vote 3 down vote accepted

org-mode provides a templating system to easily insert structural elements. Although far less featureful than yasnippet, it can come in handy.

The default templates don't include comment blocks, but you can easily add them by putting something like this in your init file:

(eval-after-load "org"
  '(add-to-list 'org-structure-template-alist
                '("C" "#+BEGIN_COMMENT\n?\n#+END_COMMENT" "")))

After this, you can easily insert comment blocks typing


on a line by itself, then <TAB> to trigger the template expansion.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .