completion/helm: redesign keybindings
A more vim-friendly (and spacemacs-friendly) keybinding scheme. May address #829
This commit is contained in:
parent
08c09c2898
commit
9eee22e3fc
2 changed files with 38 additions and 53 deletions
|
@ -83,6 +83,9 @@ be negative.")
|
||||||
;; disable special behavior for left/right, M-left/right keys.
|
;; disable special behavior for left/right, M-left/right keys.
|
||||||
helm-ff-lynx-style-map nil)
|
helm-ff-lynx-style-map nil)
|
||||||
|
|
||||||
|
(when (featurep! :feature evil +everywhere)
|
||||||
|
(setq helm-default-prompt-display-function #'+helm--set-prompt-display))
|
||||||
|
|
||||||
:init
|
:init
|
||||||
(when (and EMACS26+ (featurep! +childframe))
|
(when (and EMACS26+ (featurep! +childframe))
|
||||||
(setq helm-display-function #'+helm-posframe-display)
|
(setq helm-display-function #'+helm-posframe-display)
|
||||||
|
@ -205,37 +208,3 @@ be negative.")
|
||||||
(setq swiper-helm-display-function
|
(setq swiper-helm-display-function
|
||||||
(lambda (buf &optional _resume) (pop-to-buffer buf)))
|
(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-<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)))
|
|
||||||
|
|
|
@ -343,27 +343,43 @@
|
||||||
;; helm
|
;; helm
|
||||||
(:after helm
|
(:after helm
|
||||||
(:map helm-map
|
(:map helm-map
|
||||||
"ESC" nil
|
[up] #'previous-history-element
|
||||||
|
[down] #'next-history-element
|
||||||
"C-S-n" #'helm-next-source
|
"C-S-n" #'helm-next-source
|
||||||
"C-S-p" #'helm-previous-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-u" #'helm-delete-minibuffer-contents
|
||||||
"C-w" #'backward-kill-word
|
"C-w" #'backward-kill-word
|
||||||
"C-r" #'evil-paste-from-register ; Evil registers in helm! Glorious!
|
"C-r" #'evil-paste-from-register ; Evil registers in helm! Glorious!
|
||||||
"C-s" #'helm-minibuffer-history
|
"C-s" #'helm-minibuffer-history
|
||||||
"C-b" #'backward-word
|
"C-b" #'backward-word
|
||||||
[left] #'backward-char
|
;; Swap TAB and C-z
|
||||||
[right] #'forward-char
|
[tab] #'helm-execute-persistent-action
|
||||||
[escape] #'helm-keyboard-quit
|
"C-z" #'helm-select-action)
|
||||||
[tab] #'helm-execute-persistent-action)
|
|
||||||
(:after helm-files
|
(:after helm-files
|
||||||
(:map helm-generic-files-map
|
:map (helm-find-files-map helm-read-file-map)
|
||||||
:e [escape] #'helm-keyboard-quit)
|
[M-return] #'helm-ff-run-switch-other-window
|
||||||
(:map helm-find-files-map
|
"C-w" #'helm-find-files-up-one-level)
|
||||||
"C-w" #'helm-find-files-up-one-level
|
|
||||||
[tab] #'helm-execute-persistent-action))
|
|
||||||
(:after helm-ag
|
(:after helm-ag
|
||||||
(:map helm-ag-map
|
:map helm-ag-map
|
||||||
[backtab] #'helm-ag-edit)))
|
[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
|
;; hl-todo
|
||||||
:m "]t" #'hl-todo-next
|
:m "]t" #'hl-todo-next
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue