# Shortcut for inserting environments in org-mode

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

  #+begin_comment
...
#+end_comment


each time I'd like to insert an environment.

Question

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

\begin{comment}

\end{comment}


in latex-mode.

-
Do you have the package yasnippet installed? –  lawlist Oct 2 '13 at 20:33
This question is a duplicate of stackoverflow.com/q/19145433/1225607 –  Francesco Oct 2 '13 at 21:28

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"
'("C" "#+BEGIN_COMMENT\n?\n#+END_COMMENT" "")))


After this, you can easily insert comment blocks typing

<C


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

-