[Haskell-cafe] Re: Emacs script to align Haskell import list

Christopher Done chrisdone at googlemail.com
Sat Jun 26 14:43:14 EDT 2010

mauke from the Freenode IRC channel has contributed a vim version:


On 26 June 2010 12:25, Christopher Done <chrisdone at googlemail.com> wrote:
> I whipped up a little Emacs script to align the import lines in the
> current buffer. I am using it in my projects and have experienced no
> problems. It's good at keeping within 80 columns.
> http://gist.github.com/453933
> I've pasted it as a gist on Github so that anyone can edit it, gists
> also provide a simple revision history and comment support. Please
> feel free to contribute some tweaks and fixes. I'll then see about
> merging this into haskell-mode in some fashion.
> It doesn't handle multiple line explicit imports as I have a personal
> rule that any explicit import list with more than a few symbols should
> be changed to an "as X" import, as an addition to tibbe's style
> guide.[1]
> I haven't decided on a recommended keybinding. I'm considering a
> context-dependent binding of C-c C-. that indents the import list when
> you are on an import line.
> [1]: http://github.com/tibbe/haskell-style-guide

More information about the Haskell-Cafe mailing list