Skip to content

danielsz/om-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 

Repository files navigation

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.

About

Insert Om component template with life cycle.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •