puf
puf

Reputation: 123

Emacs/Spacemacs — rebind SLIME `eval-last-expression-in-repl` (, s e) to ctrl-enter

I’m using emacs / spacemacs.

I see that:

, s e      # slime-eval-last-expression-in-repl

sends the current highlighted line to the repl and runs it, exactly what I want.

How to add a binding into emacs/spacemacs to do the same but using ctrl-enter / ctrl-RET ?

Upvotes: 2

Views: 181

Answers (1)

Thomas
Thomas

Reputation: 17422

Put the following lines in your ~/.emacs file:

(eval-after-load 'slime-repl 
  (define-key slime-repl-mode-map (kbd "<C-return>")
              'slime-eval-last-expression-in-repl))

If you have trouble getting this to work in terminal emacs (emacs -nw), check out this related question.

Upvotes: 3

Related Questions