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

91 lines
2.3 KiB
EmacsLisp

(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")
("q" nil))
(defhydra hydra-mc (:hint nil)
"
Mark Bulk: _a_ll _s_ymbols _r_egex
Edit: _l_ines _e_nds
Misc: _n_umbers _S_ort
Mark (+S=unmark): _<up>_:prev _<down>_:next _<left>_:skip prev _<right>_:skip next"
("a" mc/mark-all-dwim)
("s" mc/mark-all-symbols-like-this)
("r" mc/mark-all-in-region-regexp)
("l" mc/edit-lines)
("e" mc/edit-ends-of-lines)
("n" mc/insert-numbers)
("S" mc/sort-regions)
("<down>" mc/mark-next-like-this)
("C-n" mc/mark-next-like-this)
("<up>" mc/mark-previous-like-this)
("C-p" mc/mark-previous-like-this)
("S-<down>" mc/unmark-previous-like-this)
("C-S-n" mc/unmark-previous-like-this)
("S-<up>" mc/unmark-next-like-this)
("C-S-p" mc/unmark-next-like-this)
("<right>" mc/skip-to-next-like-this)
("M-n" mc/skip-to-next-like-this)
("<left>" mc/skip-to-previous-like-this)
("M-p" mc/skip-to-previous-like-this)
("<return>" 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))
(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))