作者:影子张被占用 | 来源:互联网 | 2023-06-06 13:39
eshell是emacsshell的简称,是emacs自带的shell.开始设置的时候还在想是否要找到它的keymap(eshell-mode-map?).原来它是采用hook
eshell是emacs shell的简称,是emacs自带的shell.开始设置的时候还在想是否要找到它的key map (eshell-mode-map?).
原来它是采用hook设置,如下所示
(add-hook ‘eshell-mode-hook
(lambda ()
(local-set-key (kbd "C-j") ‘switch-to-buffer)
(local-set-key (kbd "C-a") ‘eshell-bol)
(local-set-key (kbd "C-c SPC") ‘ace-jump-mode)
(local-set-key (kbd "") ‘eshell-previous-matching-input-from-input)
(local-set-key (kbd "") ‘eshell-next-matching-input-from-input)))
这里,我将方向键上,下分别指定到向前和向后查找命令历史.这里要保存命令历史,采用以下配制:
(setq eshell-save-history-on-exit t)
emacs中eshell的快捷键配制,布布扣,bubuko.com