]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/swiper/ivy-hydra.el
Merge commit 'e264139e7fafbd1bbb68f9cef6d1c50b8e6cf1f3' from swiper
[gnu-emacs-elpa] / packages / swiper / ivy-hydra.el
index 6ab1f9aebe79a8cf0daa0e702d251fea01d3da15..63755da7cbf4c0a2be176b5dce13d38e95edaf59 100644 (file)
                    (byte-compile-file (buffer-file-name) t)))
              (error "Please install `hydra' and recompile/reinstall `ivy-hydra'")))))))
 
+(defun ivy--matcher-desc ()
+  (if (eq ivy--regex-function
+          'ivy--regex-fuzzy)
+      "fuzzy"
+    "ivy"))
+
 (defhydra hydra-ivy (:hint nil
                      :color pink)
   "
-^^^^^^          ^Yes^     ^No^     ^Maybe^           ^Action^
-^^^^^^^^^^^^^^---------------------------------------------------
-^ ^ _k_ ^ ^     _f_ollow  _i_nsert _c_: calling %s(if ivy-calling \"on\" \"off\")  _w_/_s_: %s(ivy-action-name)
-_h_ ^+^ _l_     _d_one    _o_ops   _m_: matcher %s(if (eq ivy--regex-function 'ivy--regex-fuzzy) \"fuzzy\" \"ivy\")
-^ ^ _j_ ^ ^     _g_o      ^ ^      _<_/_>_: shrink/grow window
+^^^^^^          ^Yes^    ^^      ^No^     ^Maybe^            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Action^               ^
+^^^^^^^^^^^^^^^----------------------------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------------
+^ ^ _k_ ^ ^     _f_ollow occ_u_r _i_nsert _c_: calling %-5s(if ivy-calling \"on\" \"off\") _w_/_s_/_a_: %-14s(ivy-action-name)
+_h_ ^+^ _l_     _d_one      ^ ^  _o_ops   _m_: matcher %-5s(ivy--matcher-desc)^^^^^^^^^^^^ _C_ase-fold: %-10`ivy-case-fold-search
+^ ^ _j_ ^ ^     _g_o        ^ ^  ^ ^      _<_/_>_: shrink/grow^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _t_runcate: %-11`truncate-lines
 "
   ;; arrows
   ("h" ivy-beginning-of-buffer)
@@ -73,7 +79,11 @@ _h_ ^+^ _l_     _d_one    _o_ops   _m_: matcher %s(if (eq ivy--regex-function 'i
   (">" ivy-minibuffer-grow)
   ("<" ivy-minibuffer-shrink)
   ("w" ivy-prev-action)
-  ("s" ivy-next-action))
+  ("s" ivy-next-action)
+  ("a" ivy-read-action)
+  ("t" (setq truncate-lines (not truncate-lines)))
+  ("C" ivy-toggle-case-fold)
+  ("u" ivy-occur :exit t))
 
 (provide 'ivy-hydra)