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.
Permalink
Failed to load latest commit information.
README.org
om-mode.el

README.org

Om-mode

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.

Installation

MELPA

M-x package-install RET om-mode

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

(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
                         ("marmalade" . "http://marmalade-repo.org/packages/")
                         ("melpa" . "http://melpa.milkbox.net/packages/")))

Manual

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

Usage

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”.

Contributing

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

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

Credits

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