Insert Om component template with life cycle.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Om-mode is a minor mode that provides the following:

  • Insert a template for an Om component.
  • Includes all of the Om life cycle protocols.
  • Jump back and forth between positions in the template.
  • User-configurable abbrev that will expand the template.



M-x package-install RET om-mode

Please make sure you have Marmalade or MELPA in your package archives.

(setq package-archives '(("gnu" . "")
                         ("marmalade" . "")
                         ("melpa" . "")))


Just put om-mode.el anywhere on your load path (or load the file manually).


Invoke the template with M-x om–insert-template.

Alternatively, type “om” and automatic expansion will occur. For this to work, either turn on abbrev-mode in the buffer, or put (setq-default abbrev-mode t) in your init file. After template insertion, next-line and previous-line will jump to places of interest in the template. When you’ve finished editing the template, type C-c C-c or invoke M-x om-exit-edit. This will reinstate the original bindings for next-line and previous-line.

Type M-x customize-group RET om-mode to change the abbreviation to expand the template. The default is “om”.


I will gladly accept pull requests with enhancements, features, refactorings, alternate implementations.

  1. Fork the repository.
  2. Make changes.
  3. Submit a pull request.


I wish to thank Steve Purcell for his guidance and expertise.