Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs slime: Whats the equivalent of the up arrow in shells?

Tags:

lisp

slime

When I type something wrong in dos/linux and it yells at me I can push the up arrow and then modify my line - maybe it was missing a '-' or something. I just installed lispbox and up arrow moves the cursor up the REPL history. How do i put on the current line the last line I entered.

So like I type

+ 3 2

But obviously I meant

(+ 3 2)

How do I get it to say "+ 3 2" so I can just push "Home", "(", "End", ")"?

Or is there some MUCH easier M-x waaahFIXIT command for this?

like image 278
Mikey Avatar asked Oct 24 '11 02:10

Mikey


1 Answers

Try

(slime-repl-previous-input)

which is bound to

M-p

by default. (Meta is normally the Alt key)

M-p / M-n is standard for going backwards / forwards through history in emacs - it also works in the minibuffer too

like image 105
alexmurray Avatar answered Nov 10 '22 21:11

alexmurray