[TxMt] Emacs-like indentation for the Haskell mode?

Emil Hedevang emilhedevang at gmail.com
Mon Mar 3 21:26:17 UTC 2008


Hi,

I would like to use TextMate as my Haskell editor instead of Emacs but  
one thing is holding me back and that is the wonderfull indentation  
features in the Haskell mode for Emacs.

In Emacs I can write the following very easily and press tab to cycle  
between the possible indentations. In the code below there are only  
one possibility for each line, and pressing tab multiple times does  
not insert any tab or space characters.

f_25 :: [a] -> a -> [a]
f_25 s c = foldr g [] s
    where g x acc = if x == c
                    then acc
                    else x : acc

If I for example unindent the code so I get the code below, then  
pressing tab once for each line (or seleting the code and executing M- 
x indent-region) will give me the pretty indented version back. Is  
there any chance that this kind of functionality could be implemented  
in TextMate?

f_25 :: [a] -> a -> [a]
f_25 s c = foldr g [] s
where g x acc = if x == c
then acc
else x : acc

Kind regards,
Emil Hedevang






More information about the textmate mailing list