aboutsummaryrefslogtreecommitdiff
path: root/.emacs.local.d/modes
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.local.d/modes')
-rw-r--r--.emacs.local.d/modes/hydra.el76
-rw-r--r--.emacs.local.d/modes/ivy.el4
2 files changed, 80 insertions, 0 deletions
diff --git a/.emacs.local.d/modes/hydra.el b/.emacs.local.d/modes/hydra.el
new file mode 100644
index 0000000..412970b
--- /dev/null
+++ b/.emacs.local.d/modes/hydra.el
@@ -0,0 +1,76 @@
+(use-package hydra
+ :defer 1)
+
+;; projectile
+(defhydra hydra-projectile-other-window (:color teal)
+ "projectile-other-window"
+ ("f" projectile-find-file-other-window "file")
+ ("g" projectile-find-file-dwim-other-window "file dwim")
+ ("d" projectile-find-dir-other-window "dir")
+ ("b" projectile-switch-to-buffer-other-window "buffer")
+ ("q" nil "cancel" :color blue))
+
+(defhydra hydra-projectile (:color teal
+ :hint nil)
+ "
+ PROJECTILE: %(projectile-project-root)
+
+ Find File Search/Tags Buffers Cache
+------------------------------------------------------------------------------------------
+_s-f_: file _a_: ag _i_: Ibuffer _c_: cache clear
+ _ff_: file dwim _g_: update gtags _b_: switch to buffer _x_: remove known project
+ _fd_: file curr dir _o_: multi-occur _s-k_: Kill all buffers _X_: cleanup non-existing
+ _r_: recent file ^^^^_z_: cache current
+ _d_: dir
+
+"
+ ("a" projectile-ag)
+ ("b" projectile-switch-to-buffer)
+ ("c" projectile-invalidate-cache)
+ ("d" projectile-find-dir)
+ ("s-f" projectile-find-file)
+ ("ff" projectile-find-file-dwim)
+ ("fd" projectile-find-file-in-directory)
+ ("g" ggtags-update-tags)
+ ("s-g" ggtags-update-tags)
+ ("i" projectile-ibuffer)
+ ("K" projectile-kill-buffers)
+ ("s-k" projectile-kill-buffers)
+ ("m" projectile-multi-occur)
+ ("o" projectile-multi-occur)
+ ("s-p" projectile-switch-project "switch project")
+ ("p" projectile-switch-project)
+ ("s" projectile-switch-project)
+ ("r" projectile-recentf)
+ ("x" projectile-remove-known-project)
+ ("X" projectile-cleanup-known-projects)
+ ("z" projectile-cache-current-file)
+ ("`" hydra-projectile-other-window/body "other window")
+ ("q" nil "cancel" :color blue))
+
+
+(global-set-key (kbd "C-c p") 'hydra-projectile/body)
+
+;; tab-bar
+(defhydra hydra-tab-bar (:color amaranth)
+ "Tab Bar Operations"
+ ("t" tab-new "Create a new tab" :column "Creation")
+ ("d" dired-other-tab "Open Dired in another tab")
+ ("f" find-file-other-tab "Find file in another tab")
+ ("0" tab-close "Close current tab")
+ ("m" tab-move "Move current tab" :column "Management")
+ ("r" tab-rename "Rename Tab")
+ ("<return>" tab-bar-select-tab-by-name "Select tab by name" :column "Navigation")
+ ("l" tab-next "Next Tab")
+ ("j" tab-previous "Previous Tab")
+ ("q" nil "Exit" :exit t))
+
+(global-set-key (kbd "C-x t") 'hydra-tab-bar/body)
+
+;; Zoom
+(defhydra hydra-zoom ()
+ "zoom"
+ ("g" text-scale-increase "in")
+ ("l" text-scale-decrease "out"))
+
+(global-set-key (kbd "C-c z") 'hydra-zoom/body)
diff --git a/.emacs.local.d/modes/ivy.el b/.emacs.local.d/modes/ivy.el
index 20a9a1d..ca3623c 100644
--- a/.emacs.local.d/modes/ivy.el
+++ b/.emacs.local.d/modes/ivy.el
@@ -32,4 +32,8 @@
("<f2> u" . counsel-unicode-char)
("C-c C-r" . ivy-resume))) ; Resume last Ivy-based completion
+(use-package ivy-hydra
+ :defer t
+ :after hydra)
+
(provide 'init-ivy)
nihil fit ex nihilo