getting evil-mode to interact well with slime-repl-mode

Chris Rosengren christopher.rosengren at
Mon Dec 5 00:27:08 CET 2011

Over the last few weeks I have been learning elisp and implementing hooks
into slime-mode
so that vim bindings feel more natural there. Here is an example

(defun slime-repl-bol-insert ()
  (evil-insert 1)

Then I would add this too a slime-repl-mode-hook

(define-key evil-normal-state-map "I" 'slime-repl-bol-insert)

I'm attempting to make all commands such as I, 0, etc work to the start of
the REPL prompt rather
than the beginning of the line. I think this has implications not only for
repl/inferior modes but dired/term/eshell
modes as well.

I have two questions, is this general approach i'm taking reasonable -
defining functions that overwrite the generic
bindings, and adding them in hooks to slime-mode/eshell-mode etc? the
second question that I'm having a hard time
with involves making dd and yy work correctly, I have browsed the source
and it seems they are implemented in
motions involving moving to the next line -> what would be a reasonable
solution to get say dd to delete everything
on a line except the prompt, and yy to yank everything on a line except the

Thanks for the great work with evil-mode
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the implementations-list mailing list