Emacs/Formatting

From HaskellWiki
< Emacs
Revision as of 18:19, 28 May 2012 by Chrisdone (talk | contribs) (Added description about how to use stylish.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


Stylish Haskell

To use Stylish Haskell on your Emacs before every save, use haskell-mode-save-buffer. It is recommended to rebind C-x C-s in haskell-mode to this. Add the following in your haskell-mode-hook.

(define-key haskell-mode-map (kbd "C-x C-s") 'haskell-mode-save-buffer)

To enable Stylish Haskell, pop the following somewhere in your Emacs configuration:

(setq haskell-stylish-on-save t)

Or in your custom set variables:

(custom-set-variables '(haskell-stylish-on-save t))

Or you can M-x customize-group haskell and pretend none of this exists!