Created
September 13, 2018 05:55
-
-
Save c02y/3b31879f07fd48d139b784ce43f849ae to your computer and use it in GitHub Desktop.
hydra in init.el
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(autoload 'multiple-cursors "multiple-cursors" t) | |
(defhydra multiple-cursors-hydra (:hint nil) | |
" | |
^Up^ ^Down^ ^Other^ | |
---------------------------------------------- | |
[_p_] Next [_n_] Next [_l_] Edit lines | |
[_P_] Skip [_N_] Skip [_a_] Mark all | |
[_M-p_] Unmark [_M-n_] Unmark [_r_] Mark by regexp | |
^ ^ ^ ^ [_q_] Quit | |
" | |
("l" mc/edit-lines :exit t) | |
("a" mc/mark-all-like-this :exit t) | |
("n" mc/mark-next-like-this) | |
("N" mc/skip-to-next-like-this) | |
("M-n" mc/unmark-next-like-this) | |
("p" mc/mark-previous-like-this) | |
("P" mc/skip-to-previous-like-this) | |
("M-p" mc/unmark-previous-like-this) | |
("r" mc/mark-all-in-region-regexp :exit t) | |
("q" nil)) | |
(defalias 'mch 'multiple-cursors-hydra/body) | |
(defhydra flycheck-hydra () | |
(:pre (progn (setq hydra-lv t) (flycheck-list-errors)) | |
:post (progn (setq hydra-lv nil) (quit-windows-on "*Flycheck errors*")) | |
:hint nil) | |
"Errors" | |
("f" flycheck-error-list-set-filter "Filter") | |
("n" flycheck-next-error "Next") | |
("p" flycheck-previous-error "Previous") | |
("gg" flycheck-first-error "First") | |
("G" (progn (goto-char (point-max)) (flycheck-previous-error)) "Last") | |
("q" nil)) | |
(defalias 'fh 'flycheck-hydra/body) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment