diff --git a/03ivy.el b/02ivy.el similarity index 100% rename from 03ivy.el rename to 02ivy.el diff --git a/03hydra.el b/03hydra.el new file mode 100644 index 0000000..7e19136 --- /dev/null +++ b/03hydra.el @@ -0,0 +1,23 @@ +(require 'hydra) + +(defhydra hydra-file-switcher-menu (:color teal :hint nil) + " +^Ivy^ ^Projectile^ ^Magit^ +^^^^^^^^------------------------------------------------------------------------ +_a_: ag _s_: Switch project _m_: status +_b_: Switch buffer _f_: Find file in project +_t_: Find file _g_: ag in current project +^^ _c_: invalidate cache +" + ("q" nil "cancel" :color pink) + + ("a" counsel-ag) + ("b" ivy-switch-buffer) + ("t" counsel-find-file) + ("s" counsel-projectile-switch-project) + ("f" counsel-projectile-find-file) + ("g" counsel-projectile-ag) + ("c" projectile-invalidate-cache) + ("m" magit-status)) + +(global-set-key (kbd "C-c p") 'hydra-file-switcher-menu/body) diff --git a/07projectile.el b/07projectile.el index a175608..b78a8fb 100644 --- a/07projectile.el +++ b/07projectile.el @@ -10,8 +10,3 @@ ) (projectile-mode t) - -(global-set-key (kbd "C-c p s") 'counsel-projectile-switch-project) -(global-set-key (kbd "C-c p t") 'counsel-projectile-find-file) -(global-set-key (kbd "C-c p a") 'counsel-projectile-ag) -(global-set-key (kbd "C-c p c") 'projectile-invalidate-cache) diff --git a/init.el b/init.el index c0e060c..9ca0609 100644 --- a/init.el +++ b/init.el @@ -79,7 +79,8 @@ ;; Additional files (load "~/.emacs.d/01mac.el") -(load "~/.emacs.d/03ivy.el") +(load "~/.emacs.d/02ivy.el") +(load "~/.emacs.d/03hydra.el") (load "~/.emacs.d/04magit.el") (load "~/.emacs.d/05prog-mode.el") (load "~/.emacs.d/06company-yasnippet.el") diff --git a/layouts/coding_with_magit.window-layout b/layouts/coding_with_magit.window-layout index e4335bd..5191b4a 100644 --- a/layouts/coding_with_magit.window-layout +++ b/layouts/coding_with_magit.window-layout @@ -1 +1 @@ -(nil (0 0 284 74) (t (0 0 143 74) (:purpose code :purpose-dedicated t :width 0.5070921985815603 :height 0.5733333333333334 :edges (0.0 0.0 0.5070921985815603 0.5733333333333334)) (:purpose tools :purpose-dedicated t :width 0.5070921985815603 :height 0.41333333333333333 :edges (0.0 0.5733333333333334 0.5070921985815603 0.9866666666666667))) (:purpose code :purpose-dedicated t :width 0.5 :height 0.9866666666666667 :edges (0.5070921985815603 0.0 1.0070921985815602 0.9866666666666667))) \ No newline at end of file +(nil (0 0 284 74) (t (0 0 143 74) (:purpose code :purpose-dedicated t :width 0.5070921985815603 :height 0.6133333333333333 :edges (0.0 0.0 0.5070921985815603 0.6133333333333333)) (:purpose tools :purpose-dedicated t :width 0.5070921985815603 :height 0.37333333333333335 :edges (0.0 0.6133333333333333 0.5070921985815603 0.9866666666666667))) (:purpose code :purpose-dedicated t :width 0.5 :height 0.9866666666666667 :edges (0.5070921985815603 0.0 1.0070921985815602 0.9866666666666667))) \ No newline at end of file