Some neat tips and tricks for using haskell-mode

Code navigation

  • By default, Emacs' commands acting on words treat camelCaseIdentifiers as a single unit. If you want to make Emacs recognise the subwords inside (so that, say, M-f will stop at "Case" in the previous example"), you can activate capitalized-words-mode. Note that this only works in Emacs 23 and the version in Emacs 23.1 is broken; get the fixed version of cap-words.el. Activate it either by hand (M-x capitalized-words-mode) or by adding to haskell-mode-hook and/or haskell-literate-mode-hook:
        (add-hook 'haskell-mode-hook '(lambda () (capitalized-words-mode t)))