emacs/.emacs.d/init-hydra.el

117 lines
3.4 KiB
EmacsLisp
Raw Normal View History

2015-06-28 11:14:40 -04:00
(require 'hydra-examples)
(defhydra hydra-window (:hint nil)
"
Split: _v_:vert _x_:horz
Delete: _c_lose _o_nly
Switch Window: _h_:left _j_:down _k_:up _l_:right
Ace: _a_ce _s_:swap
Buffers: _p_revious _n_ext _b_:select _f_ind-file
Resize: _H_:splitter left _J_:splitter down _K_:splitter up _L_:splitter right"
("h" windmove-left)
("j" windmove-down)
("k" windmove-up)
("l" windmove-right)
("p" previous-buffer)
("n" next-buffer)
("b" ido-switch-buffer)
("f" ido-find-file)
("x" split-window-below)
("v" split-window-right)
("a" ace-window)
("s" ace-swap-window)
("c" delete-window)
("o" delete-other-windows)
("H" hydra-move-splitter-left)
("J" hydra-move-splitter-down)
("K" hydra-move-splitter-up)
("L" hydra-move-splitter-right)
("q" nil))
(defhydra hydra-shortcuts (:hint nil :color blue :columns 3)
"Shortcuts"
("d" insert-date "insert date")
("t" todotxt-open-file "open todotxt")
2015-06-28 11:14:40 -04:00
("q" nil))
(defhydra hydra-mc ()
"Marks: %(mc/num-cursors)"
("a" mc/mark-all-dwim "all" :column "Bulk")
("s" mc/mark-all-symbols-like-this "symbols")
("r" mc/mark-all-in-region-regexp "regex")
("l" mc/edit-lines "lines" :column "Edit")
("e" mc/edit-ends-of-lines "ends")
("n" mc/insert-numbers "number" :column "Misc")
("S" mc/sort-regions "sort" :column "Misc")
("<up>" mc/mark-previous-like-this "prev" :column "Manual")
("<down>" mc/mark-next-like-this "next")
("S-<up>" mc/unmark-next-like-this nil)
("S-<down>" mc/unmark-previous-like-this nil)
("<left>" mc/skip-to-previous-like-this "skip prev")
("<right>" mc/skip-to-next-like-this "skip next")
("C-p" mc/mark-previous-like-this "prev" :column "Manual (Alt)")
("C-n" mc/mark-next-like-this "next")
("C-S-p" mc/unmark-next-like-this nil)
("C-S-n" mc/unmark-previous-like-this nil)
("M-p" mc/skip-to-previous-like-this "skip prev")
("M-n" mc/skip-to-next-like-this "skip next")
("<return>" nil nil))
(defhydra hydra-mc-manual (:hint nil :foreign-keys run)
"
_SPC_: Add at point _C-g_: Abort _<return>_: Start"
("SPC" (mc/create-fake-cursor-at-point))
("C-g" (multiple-cursors-mode 0) :exit t)
("<return>" (multiple-cursors-mode 1) :exit t))
2015-06-28 11:14:40 -04:00
(defhydra hydra-avy (:hint nil :color blue)
"
char: _c_: 1 char _C_: 2 char
word: _w_: 1 char _W_: 0 char"
("c" avy-goto-char)
("C" avy-goto-char-2)
("w" avy-goto-word-1)
("W" avy-goto-word-0)
("q" nil))
2019-02-06 00:20:57 -05:00
(defhydra hydra-smerge
(:color pink :hint nil :post (smerge-auto-leave))
"
^Move^ ^Keep^ ^Diff^ ^Other^
^^-----------^^-------------------^^---------------------^^-------
_n_ext _b_ase _<_: upper/base _C_ombine
_p_rev _u_pper _=_: upper/lower _r_esolve
^^ _l_ower _>_: base/lower _k_ill current
^^ _a_ll _R_efine
^^ _RET_: current _E_diff _q_: cancel
"
("n" smerge-next)
("p" smerge-prev)
("b" smerge-keep-base)
("u" smerge-keep-upper)
("l" smerge-keep-lower)
("a" smerge-keep-all)
("RET" smerge-keep-current)
("\C-m" smerge-keep-current)
("<" smerge-diff-base-upper)
("=" smerge-diff-upper-lower)
(">" smerge-diff-base-lower)
("R" smerge-refine)
("E" smerge-ediff)
("C" smerge-combine-with-next)
("r" smerge-resolve)
("k" smerge-kill-current)
("q" nil :color blue))