This is the official manual for the latest Org-mode release.

Table of Contents

Next: , Previous: Completion, Up: Miscellaneous


15.2 Easy templates

With just a few keystrokes, Org's easy templates inserts empty pairs of structural elements, such as #+BEGIN_SRC and #+END_SRC. Easy templates use an expansion mechanism, which is native to Org, in a process similar to yasnippet and other Emacs template expansion packages.

<<> <s> <TAB> completes the ‘src’ code block.

< l <TAB>

expands to:

#+BEGIN_EXPORT latex

#+END_EXPORT

Org comes with these pre-defined easy templates:

s #+BEGIN_SRC ... #+END_SRC
e #+BEGIN_EXAMPLE ... #+END_EXAMPLE
q #+BEGIN_QUOTE ... #+END_QUOTE
v #+BEGIN_VERSE ... #+END_VERSE
c #+BEGIN_CENTER ... #+END_CENTER
l #+BEGIN_EXPORT latex ... #+END_EXPORT
L #+LATEX:
h #+BEGIN_EXPORT html ... #+END_EXPORT
H #+HTML:
a #+BEGIN_EXPORT ascii ... #+END_EXPORT
A #+ASCII:
i #+INDEX: line
I #+INCLUDE: line

More templates can added by customizing the variable org-structure-template-alist, whose docstring has additional details.