Fix hydra-ivy keybind on M-o #1342

This commit is contained in:
Henrik Lissner 2019-04-20 02:15:14 -04:00
parent ee754362a2
commit 7e7d6ae5a2
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 28 additions and 37 deletions

View file

@ -1,43 +1,31 @@
;;; completion/ivy/autoload/hydras.el -*- lexical-binding: t; -*- ;;; completion/ivy/autoload/hydras.el -*- lexical-binding: t; -*-
;;;###autoload (autoload '+ivy-coo-hydra/body "completion/ivy/autoload/hydras" nil t) ;;;###autoload
(defhydra +ivy-coo-hydra (:hint nil :color pink) (after! ivy-hydra
" (defhydra+ hydra-ivy (:hint nil :color pink)
"
Move ^^^^^^^^^^ | Call ^^^^ | Cancel^^ | Options^^ | Action _w_/_s_/_a_: %s(ivy-action-name) Move ^^^^^^^^^^ | Call ^^^^ | Cancel^^ | Options^^ | Action _w_/_s_/_a_: %s(ivy-action-name)
----------^^^^^^^^^^-+--------------^^^^-+-------^^-+--------^^-+--------------------------------- ----------^^^^^^^^^^-+--------------^^^^-+-------^^-+--------^^-+---------------------------------
_g_ ^ ^ _k_ ^ ^ _u_ | _f_orward _o_ccur | _i_nsert | _c_alling: %-7s(if ivy-calling \"on\" \"off\") _C_ase-fold: %-10`ivy-case-fold-search _g_ ^ ^ _k_ ^ ^ _u_ | _f_orward _o_ccur | _i_nsert | _c_alling: %-7s(if ivy-calling \"on\" \"off\") _C_ase-fold: %-10`ivy-case-fold-search
^^ _h_ ^+^ _l_ ^^ | _RET_ done ^^ | _q_uit | _m_atcher: %-7s(ivy--matcher-desc) _t_runcate: %-11`truncate-lines ^^ _h_ ^+^ _l_ ^^ | _RET_ done ^^ | _q_uit | _m_atcher: %-7s(ivy--matcher-desc) _t_runcate: %-11`truncate-lines
_G_ ^ ^ _j_ ^ ^ _d_ | _TAB_ alt-done ^^ | ^ ^ | _<_/_>_: shrink/grow _G_ ^ ^ _j_ ^ ^ _d_ | _TAB_ alt-done ^^ | ^ ^ | _<_/_>_: shrink/grow
" "
;; arrows ;; arrows
("j" ivy-next-line) ("l" ivy-alt-done)
("k" ivy-previous-line) ("h" ivy-backward-delete-char)
("l" ivy-alt-done) ("g" ivy-beginning-of-buffer)
("h" ivy-backward-delete-char) ("G" ivy-end-of-buffer)
("g" ivy-beginning-of-buffer) ("d" ivy-scroll-up-command)
("G" ivy-end-of-buffer) ("u" ivy-scroll-down-command)
("d" ivy-scroll-up-command) ("e" ivy-scroll-down-command)
("u" ivy-scroll-down-command) ;; actions
("e" ivy-scroll-down-command) ("q" keyboard-escape-quit :exit t)
;; actions ("<escape>" keyboard-escape-quit :exit t)
("q" keyboard-escape-quit :exit t) ("TAB" ivy-alt-done :exit nil)
("C-g" keyboard-escape-quit :exit t) ("RET" ivy-done :exit t)
("<escape>" keyboard-escape-quit :exit t) ("C-SPC" ivy-call-and-recenter :exit nil)
("C-o" nil) ("f" ivy-call)
("i" nil) ("c" ivy-toggle-calling)
("TAB" ivy-alt-done :exit nil) ("m" ivy-toggle-fuzzy)
("C-j" ivy-alt-done :exit nil) ("t" (setq truncate-lines (not truncate-lines)))
("RET" ivy-done :exit t) ("o" ivy-occur :exit t)))
("C-m" ivy-done :exit t)
("C-SPC" ivy-call-and-recenter :exit nil)
("f" ivy-call)
("c" ivy-toggle-calling)
("m" ivy-toggle-fuzzy)
(">" ivy-minibuffer-grow)
("<" ivy-minibuffer-shrink)
("w" ivy-prev-action)
("s" ivy-next-action)
("a" ivy-read-action)
("t" (setq truncate-lines (not truncate-lines)))
("C" ivy-toggle-case-fold)
("o" ivy-occur :exit t))

View file

@ -77,11 +77,14 @@ immediately runs it on the current candidate (ending the ivy session)."
(ivy-mode +1) (ivy-mode +1)
(def-package! ivy-hydra (def-package! ivy-hydra
:commands (ivy-dispatching-done-hydra ivy--matcher-desc) :commands (ivy-dispatching-done-hydra ivy--matcher-desc ivy-hydra/body)
:init :init
(define-key! ivy-minibuffer-map (define-key! ivy-minibuffer-map
"C-o" #'ivy-dispatching-done-hydra "C-o" #'ivy-dispatching-done-hydra
"M-o" #'+ivy-coo-hydra/body))) "M-o" #'hydra-ivy/body)
:config
;; ivy-hydra rebinds this, so we have to do so again
(define-key ivy-minibuffer-map (kbd "M-o") #'hydra-ivy/body)))
(def-package! ivy-rich (def-package! ivy-rich