    jump   _i_ → outline in current buffer   _l_ → lines in current buffer
           _b_ → bookmarks                   _L_ → lines in all buffers
 "
-  ("i" (progn
-         (cond ((eq dotemacs-switch-engine 'ivy)
-                (call-interactively #'counsel-imenu))
-               ((eq dotemacs-switch-engine 'helm)
-                (call-interactively #'helm-semantic-or-imenu))
-               (t
-                (call-interactively #'imenu)))))
-  ("l" (progn
-         (cond ((eq dotemacs-switch-engine 'ivy)
-                (call-interactively #'swiper))
-               ((eq dotemacs-switch-engine 'helm)
-                (call-interactively #'helm-swoop)))))
-  ("L" (progn
-         (cond ((eq dotemacs-switch-engine 'ivy)
-                (call-interactively #'swiper-all))
-               ((eq dotemacs-switch-engine 'helm)
-                (call-interactively #'helm-multi-swoop)))))
+  ("i" (my-switch-action #'imenu :ivy #'counsel-imenu :helm #'helm-semantic-or-imenu))
+  ("l" (my-switch-action nil     :ivy #'swiper        :helm #'helm-swoop))
+  ("L" (my-switch-action nil     :ivy #'swiper-all    :helm #'helm-multi-swoop))
   ("b" bookmark-jump))
 
 
"
  ("D" my-delete-current-buffer-file)
  ("R" my-rename-current-buffer-file)
  ("f" (progn
         (cond ((eq dotemacs-switch-engine 'ivy)
                (call-interactively #'counsel-find-file))
               ((eq dotemacs-switch-engine 'helm)
                (call-interactively #'helm-find-files))
               (t
                (call-interactively #'find-file)))))
  ("r" (progn
         (cond ((eq dotemacs-switch-engine 'ivy)
                (call-interactively #'ivy-recentf))
               ((eq dotemacs-switch-engine 'helm)
                (call-interactively #'helm-recentf))
               (t
                (call-interactively #'recentf)))))
  ("y" my-copy-file-name-to-clipboard)
  ("E" my-find-file-as-root)
  ("c" copy-file)

   errors:  _n_ → next error       _t_ → toggle flycheck (%`my-errors-hydra/flycheck)
            _p_ → previous error
"
  ("n" (if my-errors-hydra/flycheck
           (call-interactively #'flycheck-next-error)
         (call-interactively #'next-error)))
  ("p" (if my-errors-hydra/flycheck
           (call-interactively #'flycheck-previous-error)
         (call-interactively #'previous-error)))
  ("t" (setq my-errors-hydra/flycheck (not my-errors-hydra/flycheck))))



(defhydra my-quit-hydra (:hint nil :exit t)
  "
   quit:  _q_ → quit    _r_ → restart
"
  ("q" save-buffers-kill-emacs)
  ("r" restart-emacs))
