Lid*_*ith 47 shell emacs ubuntu
我在 Ubuntu 上处于终端模式,我正在运行 emacs 并打开 2 个缓冲区,一个是 ruby 文件,另一个是 shell(通过键入 Mx shell 打开),当我切换到 shell 缓冲区时,我想要运行我之前运行的相同命令。我通常只会在终端窗口中点击向上箭头,但在 emacs 中,它只是将光标放在一行上。
有谁知道从 emacs shell 中运行上一个 shell 命令的击键?
Pra*_*h K 26
除了M-p,您还可以使用C-up,我觉得这更可取。补充键M-n或C-down将为您提供历史上的下一个命令。
您还可以将其添加到您的 emacs init 文件中:
(define-key comint-mode-map (kbd "<up>") 'comint-previous-input)
(define-key comint-mode-map (kbd "<down>") 'comint-next-input)
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
15382 次 |
最近记录: |