Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/10sr/editorconfig-custom-majormode-el
Decide major-mode from EditorConfig
https://github.com/10sr/editorconfig-custom-majormode-el
Last synced: about 2 months ago
JSON representation
Decide major-mode from EditorConfig
- Host: GitHub
- URL: https://github.com/10sr/editorconfig-custom-majormode-el
- Owner: 10sr
- License: unlicense
- Created: 2016-06-13T08:58:19.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-16T02:44:09.000Z (over 6 years ago)
- Last Synced: 2024-11-09T20:37:40.328Z (about 2 months ago)
- Language: Emacs Lisp
- Homepage:
- Size: 21.5 KB
- Stars: 10
- Watchers: 6
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= 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.