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" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")))
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.
- Fork the repository.
- Make changes.
- Submit a pull request.
I wish to thank Steve Purcell for his guidance and expertise.