https://github.com/jcollard/elm-mode.git
git clone 'git://github.com/jcollard/elm-mode.git'
Elm mode for EMACS.
elm-mode
indentation is based on cycling: every time you insert a new
line there will be one or more indentation levels available for you to
choose from. The exact number is printed in the minibuffer either as
Sole indentation
or Indent cycle (n)...
where n
is the number of
available indentations to choose from. If the automatic indentation
level was not the one you expected simply hit TAB
to cycle through the
list (note that hitting any other key will cancel the cycle).
If your Emacs has package.el
(which is automatically the case
for Emacs >= 24), you can install elm-mode
from the package in
MELPA.
Add this repo to your load-path and (require 'elm-mode)
. Ensure that
the following dependencies are available:
This package assumes you are runing Emacs 24 or later.
The following bindings are available in elm-mode
:
elm-make
| Keybinding | Description |
| —————— | ————————————— |
| C-c C-c | Compile the current buffer. |
| C-c M-c | Compile the Main.elm
file. |
elm-repl
| Keybinding | Description |
| —————— | ———————————————————————- |
| C-c C-l | Load the current file in a REPL. |
| C-c C-p | Push the current region to a REPL. |
| C-c C-e | Push the current decl. to a REPL (requires haskell-mode
). |
elm-reactor
| Keybinding | Description |
| ———————- | —————————————————————— |
| C-c C-n | Preview the current buffer in a browser. |
| C-u C-c C-n | Preview the current buffer in a browser in debug mode. |
| C-c C-m | Preview the Main.elm
file in a browser. |
| C-u C-c C-m | Preview the Main.elm
file in a browser in debug mode. |
elm-package
| Keybinding | Description | | ———————- | ———————————————————— | | C-c C-d | View a function's documentation in a browser. | | C-c C-i | Import a module from one of the dependencies. | | C-c M-k | Open the package catalog. | | C-u C-c M-k | Open the package catalog, refreshing the package list first. |
The following bindings are available in the package list buffer:
| Keybinding | Description | | ———— | —————————— | | g | Refresh package list. | | n | Next package. | | p | Previous package. | | v | View package in browser. | | m | Mark package for installation. | | i | Mark package for installation. | | u | Unmark package. | | x | Install marked packages. |