README.adoc

April 25, 2017 ยท View on GitHub

= editorconfig-custom-majormode.el

image:https://travis-ci.org/10sr/editorconfig-custom-majormode-el.svg?branch=master["Build Status", link=https://travis-ci.org/10sr/editorconfig-custom-majormode-el] image:https://melpa.org/packages/editorconfig-custom-majormode-badge.svg["MELPA", link=https://melpa.org/\#/editorconfig-custom-majormode] image:https://stable.melpa.org/packages/editorconfig-custom-majormode-badge.svg["MELPA Stable", link=https://stable.melpa.org/#/editorconfig-custom-majormode]

Decide major-mode from EditorConfig

This package is an link:http://editorconfig.org/[EditorConfig] extension that defines a property to specify which Emacs major-mode to use for files.

If package.el is installed on your Emacs and the major-mode specified is installable, this plugin asks whether you want to install and enable it automatically.

== Usage

Add emacs_mode to your .editorconfig as follows, and nginx-mode will be always enabled when visiting *.conf files.

..editorconfig [source,ini]

[*.conf] emacs_mode = nginx

Also this library has an experimental mmm-mode support. To use it, add properties like:

[source,ini]

[*.conf.j2] emacs_mode = nginx emacs_mmm_classes = jinja2

Multiple mmm_classes can be specified by separating classes with commmas.

To enable this plugin, add editorconfig-custom-majormode to editorconfig-custom-hooks:

[source,emacslisp]

(add-hook 'editorconfig-custom-hooks 'editorconfig-custom-majormode)

== License

This software is unlicensed. See LICENSE for details.