Yasnippet Index

Yasnippet is a templating system for Emacs. You type an abbreviation followed by an expansion key (usually TAB) and you get the expanded text.

Abbreviations are defined in snippet files, and are made available on a per major mode basis.

Yasnippet directory structure

Read the documentation for how to write a snippet. You basically just create points in your file where the TAB key will bring you as you fill in the fields.