diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2015-12-05 12:39:40 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2015-12-05 12:39:40 -0700 |
commit | 4a9d2ba9e48e34bc5646d27f07991b276fba036b (patch) | |
tree | 05a4ba62b575208871f386f4d10aa4f7d5442fca | |
parent | 0c357f1b90cd383724593d05b39844e369b67795 (diff) | |
download | haskell-tab-indent-4a9d2ba9e48e34bc5646d27f07991b276fba036b.tar.gz |
add a readme
-rw-r--r-- | README.md | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..5537325 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +This file provides `haskell-tab-indent-mode`, a simple Emacs +indentation minor mode for Haskell projects which require tabs for +indentation and do not permit spaces (except for where clauses, as a +special case). A prominent example of such a project is +[git-annex][]. + +The user may use TAB to cycle between possible indentations. + +# Installation + +You may copy `haskell-tab-indent.el` to somewhere in your `load-path` +and simply + + (autoload 'haskell-tab-indent-mode "haskell-tab-indent.el") + +Or you may use [git subtrees][]: + + emacs-pkg-subtree pull https://git.spwhitton.name/haskell-tab-indent 0.1.0 + +[git subtrees]: https://spwhitton.name/blog/entry/emacs-pkg-subtree/ + +# Usage + +If you set `indent-tabs-mode` in the `.dir-locals.el` file for a +project requiring tabs, you can use something like this in your init +file to enable this mode for such projects, defaulting to the usual +`haskell-indentation-mode`: + + (add-hook 'haskell-mode-hook + (lambda () + (add-hook 'hack-local-variables-hook + (lambda () + (if indent-tabs-mode + (haskell-tab-indent-mode) + (haskell-indentation-mode))) + nil t))) ; local hook + +[git-annex]: https://git-annex.branchable.com/coding_style/ |