From 828ce8884b79579919a7ee895c1d3bb148d39de3 Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 3 Sep 2022 23:31:36 +0100 Subject: C-c h only for comint and eshell --- custom/jao-custom-completion.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/custom/jao-custom-completion.el b/custom/jao-custom-completion.el index 3977167..804e049 100644 --- a/custom/jao-custom-completion.el +++ b/custom/jao-custom-completion.el @@ -221,14 +221,13 @@ ("C-x C-b" . consult-buffer) ("C-x 4 b" . consult-buffer-other-window) ("C-c b" . project-find-file) - ("C-c h" . consult-history) + ("C-c h" . nil) ("C-c i" . consult-imenu) ("C-c I" . consult-project-imenu) ;; ("C-c o" . consult-outline) ("C-c k" . consult-ripgrep) ("C-c K" . consult-git-grep) ("C-c L" . consult-locate) - ;; ("C-h m" . consult-mode-command) ("C-c s" . consult-line) ("C-x r x" . consult-register) ("C-x r b" . consult-bookmark) @@ -237,8 +236,6 @@ ("M-g m" . consult-mark) ("M-g e" . consult-error) ("M-s m" . consult-multi-occur) - ;; ("M-o" . consult-outline) - ;; ("M-i" . consult-imenu) ("M-y" . consult-yank-pop) ("C-s" . isearch-forward) (" a" . consult-apropos)) @@ -257,6 +254,12 @@ (define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help) + (with-eval-after-load "eshell" + (define-key eshell-mode-map (kbd "C-c h") #'consult-history)) + + (with-eval-after-load "comint" + (define-key comint-mode-map (kbd "C-c h") #'consult-history)) + (consult-customize consult-mark :preview-key 'any) (add-hook 'completion-list-mode-hook #'consult-preview-at-point-mode)) -- cgit v1.2.3