can't use "S" in normal mode with haskell-mode

Michael Markert markert.michael at gmail.com
Wed Mar 20 09:25:03 CET 2013


On Wed, Mar 20 2013 (01:52), Linus Arver <linusarver at gmail.com> wrote: 

> On Tue, Mar 19, 2013 at 06:32:24PM +0100, Michael Markert wrote:
>> Actually not direct, but when it does when entering insert-state, this
>> 
>>     (add-hook haskell-mode-hook (lambda () (setq evil-auto-indent nil)))
>> 
>> should work around it.
>
> This works wonderfully! Thank you very much.
>
> For what it's worth, here is my current Haskell-specific code for
> dead-simple indentation in my ~/.emacs:
>
>     ; custom indentation function: copy the indentation of the previous line
>     ; adopted from http://sequence.complete.org/node/365
>     (defun newline-and-indent-relative ()
>         (interactive)
>         (newline)
>         (indent-to-column (save-excursion
>             (forward-line -1)
>             (back-to-indentation)
>             (current-column)))
>     )

Well if you don't want to use the indent modes this one is even simpler:

     (add-hook 'haskell-mode (lambda () (setq indent-line-function #'indent-relative)))
     
This could make your custom function superfluous and you don't have to
disable the auto-indent.

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
Url : https://lists.ourproject.org/pipermail/implementations-list/attachments/20130320/8c083cf1/attachment.pgp 


More information about the implementations-list mailing list