Helm: Remap standard commands instead of rebinding manually

master
Pierre Neidhardt 2017-09-13 21:20:04 +01:00
parent abb2bee8cb
commit 30ad1f3c66
2 changed files with 15 additions and 8 deletions

View File

@ -3,6 +3,8 @@
;; TODO: Make bindings completely evil: <esc> then hjkl should do what is intended.
;; Try out and see how convenient that is.
(global-set-key "\M-y" 'helm-show-kill-ring)
;; To navigate helm entries with hjkl, using the C- modifier would conflict
;; with C-h (help prefix) and C-k (`evil-insert-digraph'). We use M- instead.
(define-keys helm-map

View File

@ -123,15 +123,20 @@ Requires `call-process-to-string' from `functions'."
(rectangle-exchange-point-and-mark)
(helm-all-mark-rings)))
(global-set-key [remap execute-extended-command] 'helm-M-x)
(global-set-key [remap find-file] 'helm-find-files)
(global-set-key [remap occur] 'helm-occur)
(global-set-key [remap list-buffers] 'helm-mini)
;; (global-set-key [remap dabbrev-expand] 'helm-dabbrev)
(global-set-key [remap yank-pop] 'helm-show-kill-ring)
(global-set-key [remap exchange-point-and-mark] 'helm-mark-or-exchange-rect)
(global-set-key [remap apropos-command] 'helm-apropos)
(global-set-key [remap query-replace-regexp] 'helm-regexp)
(unless (boundp 'completion-in-region-function)
(define-key lisp-interaction-mode-map [remap completion-at-point] 'helm-lisp-completion-at-point)
(define-key emacs-lisp-mode-map [remap completion-at-point] 'helm-lisp-completion-at-point))
(global-set-keys
"M-x" 'helm-M-x
"C-x C-f" 'helm-find-files
"C-x C-b" 'helm-mini
"M-y" 'helm-show-kill-ring
"C-x C-x" 'helm-mark-or-exchange-rect
"M-s o" 'helm-occur
"C-h a" 'helm-apropos
"C-M-%" 'helm-regexp
"C-x M-g" 'helm-grep-git-or-ag
"C-x M-G" 'helm-do-grep-ag)