logoalt Hacker News

m463today at 5:20 AM2 repliesview on HN

I tried using shell mode in emacs, but my fingers use control-p and control-r on the terminal shell and I fail.

instead of searching backwards in commands, it does it in the buffer.

How do people deal with this?


Replies

MarsIronPItoday at 6:40 AM

I've retrained muscle memory to use C-c C-l (which I rebind to `consult-history'). This gives me a fuzzy-searchable list of all my history. I find that I prefer this to a normal shell's C-r, because with my vertical completion setup I can see multiple matches for my search simultaneously.

qazxcvbnmtoday at 5:27 AM

M-n, M-p. M-r for searching on past commands. C-c c-n/C-p for next/previous prompt. C-c C-r to scroll to focus on output.

Having switched recently to Emacs, my current issue is how to get Emacs shell history saved properly for my other shell buffers, and getting completions from shell (not Emacs) to work, planning to try MisTTY soon.