diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index e6d5bdaa1..d6e669fa5 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -83,6 +83,9 @@ be negative.") ;; disable special behavior for left/right, M-left/right keys. helm-ff-lynx-style-map nil) + (when (featurep! :feature evil +everywhere) + (setq helm-default-prompt-display-function #'+helm--set-prompt-display)) + :init (when (and EMACS26+ (featurep! +childframe)) (setq helm-display-function #'+helm-posframe-display) @@ -205,37 +208,3 @@ be negative.") (setq swiper-helm-display-function (lambda (buf &optional _resume) (pop-to-buffer buf))) - -;; -;; Evil integration -;; - -(when (featurep! :feature evil +everywhere) - (setq helm-default-prompt-display-function #'+helm--set-prompt-display) - - (map! (:after helm - :map helm-map - "C-S-p" #'helm-previous-source - "C-S-n" #'helm-next-source - "C-l" #'helm-execute-persistent-action - "C-j" #'helm-next-line - "C-k" #'helm-previous-line - "C-f" #'helm-next-page - "C-u" #'helm-previous-page - [tab] #'helm-select-action) - (:after helm-files - :map (helm-find-files-map helm-read-file-map) - [M-return] #'helm-ff-run-switch-other-window - "M-h" #'helm-find-files-up-one-level) - (:after helm-locate - :map helm-generic-files-map - "S-" #'helm-ff-run-switch-other-window) - (:after helm-buffers - :map helm-buffer-map - [M-return] #'helm-buffer-switch-other-window) - (:after helm-regexp - :map helm-moccur-map - [M-return] #'helm-moccur-run-goto-line-ow) - (:after helm-grep - :map helm-grep-map - [M-return] #'helm-grep-run-other-window-action))) diff --git a/modules/config/default/+bindings.el b/modules/config/default/+bindings.el index 2d37b7f14..23fc47d36 100644 --- a/modules/config/default/+bindings.el +++ b/modules/config/default/+bindings.el @@ -343,27 +343,43 @@ ;; helm (:after helm (:map helm-map - "ESC" nil - "C-S-n" #'helm-next-source - "C-S-p" #'helm-previous-source - "C-u" #'helm-delete-minibuffer-contents - "C-w" #'backward-kill-word - "C-r" #'evil-paste-from-register ; Evil registers in helm! Glorious! - "C-s" #'helm-minibuffer-history - "C-b" #'backward-word - [left] #'backward-char - [right] #'forward-char - [escape] #'helm-keyboard-quit - [tab] #'helm-execute-persistent-action) + [up] #'previous-history-element + [down] #'next-history-element + "C-S-n" #'helm-next-source + "C-S-p" #'helm-previous-source + "C-j" #'helm-next-line + "C-k" #'helm-previous-line + "C-S-j" #'helm-next-source + "C-S-k" #'helm-previous-source + "C-f" #'helm-next-page + "C-S-f" #'helm-previous-page + "C-u" #'helm-delete-minibuffer-contents + "C-w" #'backward-kill-word + "C-r" #'evil-paste-from-register ; Evil registers in helm! Glorious! + "C-s" #'helm-minibuffer-history + "C-b" #'backward-word + ;; Swap TAB and C-z + [tab] #'helm-execute-persistent-action + "C-z" #'helm-select-action) (:after helm-files - (:map helm-generic-files-map - :e [escape] #'helm-keyboard-quit) - (:map helm-find-files-map - "C-w" #'helm-find-files-up-one-level - [tab] #'helm-execute-persistent-action)) + :map (helm-find-files-map helm-read-file-map) + [M-return] #'helm-ff-run-switch-other-window + "C-w" #'helm-find-files-up-one-level) (:after helm-ag - (:map helm-ag-map - [backtab] #'helm-ag-edit))) + :map helm-ag-map + [backtab] #'helm-ag-edit) + (:after helm-locate + :map helm-generic-files-map + [M-return] #'helm-ff-run-switch-other-window) + (:after helm-buffers + :map helm-buffer-map + [M-return] #'helm-buffer-switch-other-window) + (:after helm-regexp + :map helm-moccur-map + [M-return] #'helm-moccur-run-goto-line-ow) + (:after helm-grep + :map helm-grep-map + [M-return] #'helm-grep-run-other-window-action)) ;; hl-todo :m "]t" #'hl-todo-next