ReverseFlux

Hydra 3

Feb 10th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.27 KB | None | 0 0
  1. (defhydra hydra-window-stuff (:hint nil)
  2. "
  3. Split: _v_ert _s_:horz
  4. Delete: _c_lose _o_nly
  5. Switch Window: _h_:left _j_:down _k_:up _l_:right
  6. Buffers: _p_revious _n_ext _b_:select _f_ind-file _F_projectile
  7. Winner: _u_ndo _r_edo
  8. Resize: _H_:splitter left _J_:splitter down _K_:splitter up _L_:splitter right
  9. Move: _a_:up _z_:down _i_menu"
  10.  
  11.  
  12. ("z" scroll-up-line)
  13. ("a" scroll-down-line)
  14. ("i" idomenu)
  15.  
  16. ("u" winner-undo)
  17. ("r" winner-redo)
  18.  
  19. ("h" windmove-left)
  20. ("j" windmove-down)
  21. ("k" windmove-up)
  22. ("l" windmove-right)
  23.  
  24. ("p" previous-buffer)
  25. ("n" next-buffer)
  26. ("b" ido-switch-buffer)
  27. ("f" ido-find-file)
  28. ("F" projectile-find-file)
  29.  
  30. ("s" split-window-below)
  31. ("v" split-window-right)
  32.  
  33. ("c" delete-window)
  34. ("o" delete-other-windows)
  35.  
  36. ("H" hydra-move-splitter-left)
  37. ("J" hydra-move-splitter-down)
  38. ("K" hydra-move-splitter-up)
  39. ("L" hydra-move-splitter-right)
  40.  
  41. ("q" nil))
  42.  
  43. (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
  44. (global-set-key (kbd "C->") 'mc/mark-next-like-this)
  45. (global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
  46. (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
  47.  
  48. (defhydra cqql-multiple-cursors-hydra (:hint nil)
  49. "
  50. ^Up^ ^Down^ ^Miscellaneous^
  51. ----------------------------------------------
  52. [_p_] Next [_n_] Next [_l_] Edit lines
  53. [_P_] Skip [_N_] Skip [_a_] Mark all
  54. [_M-p_] Unmark [_M-n_] Unmark [_q_] Quit"
  55. ("l" mc/edit-lines :exit t)
  56. ("a" mc/mark-all-like-this :exit t)
  57. ("n" mc/mark-next-like-this)
  58. ("N" mc/skip-to-next-like-this)
  59. ("M-n" mc/unmark-next-like-this)
  60. ("p" mc/mark-previous-like-this)
  61. ("P" mc/skip-to-previous-like-this)
  62. ("M-p" mc/unmark-previous-like-this)
  63. ("q" nil))
  64.  
  65. (defhydra hydra-org (:color red :hint nil)
  66. "
  67. Navigation^
  68. ---------------------------------------------------------
  69. _j_ next heading
  70. _k_ prev heading
  71. _h_ next heading (same level)
  72. _l_ prev heading (same level)
  73. _u_p higher heading
  74. _g_o to
  75. "
  76. ("j" outline-next-visible-heading)
  77. ("k" outline-previous-visible-heading)
  78. ("h" org-forward-heading-same-level)
  79. ("l" org-backward-heading-same-level)
  80. ("u" outline-up-heading)
  81. ("g" org-goto :exit t))
  82.  
  83. (defhydra hydra-help (:exit t)
  84. ;; Better to exit after any command because otherwise helm gets in a
  85. ;; mess, set hint to nil: written out manually.
  86.  
  87. "
  88. Describe ^^Keys ^^Search ^^Documentation
  89. ---------------------------------------------------------------------------------------
  90. _f_unction _k_eybinding _a_propros _i_nfo
  91. _p_ackage _w_here-is _d_oc strings _n_: man
  92. _m_ode _b_: show all bindings _s_: info by symbol _h_elm-dash
  93. _v_ariable
  94.  
  95. "
  96. ;; Boring help commands...
  97. ("e" view-echo-area-messages "messages")
  98. ("l" view-lossage "lossage")
  99. ("C" describe-coding-system "coding-system")
  100. ("I" describe-input-method "input-method")
  101.  
  102.  
  103. ;; Documentation
  104. ("i" info nil)
  105. ("n" helm-man-woman nil)
  106. ("h" helm-dash)
  107.  
  108. ;; Keybinds
  109. ("b" describe-bindings nil)
  110. ("c" describe-key-briefly nil)
  111. ("k" describe-key nil)
  112. ("w" where-is nil)
  113.  
  114. ;; Search
  115. ("a" apropos-command nil)
  116. ("d" apropos-documentation nil)
  117. ("s" info-lookup-symbol nil)
  118.  
  119. ;; Describe
  120. ("f" describe-function nil)
  121. ("p" describe-package nil)
  122. ("m" describe-mode nil)
  123. ("v" describe-variable nil)
  124. ("y" describe-syntax nil)
  125.  
  126. ;; quit
  127. ("q" help-quit "quit"))
  128. (global-set-key (kbd "<f1>") #'hydra-help/body)
  129.  
  130. (defhydra goto (:color blue :hint nil)
  131. "
  132. Goto:
  133. ^Char^ ^Word^ ^org^ ^search^
  134. ^^^^^^^^---------------------------------------------------------------------------
  135. _c_: 2 chars _w_: word by char _h_: headline in buffer _o_: helm-occur
  136. _C_: char _W_: some word _a_: heading in agenda _p_: helm-swiper
  137. _L_: char in line _s_: subword by char _q_: swoop org buffers _f_: search forward
  138. ^ ^ _S_: some subword ^ ^ _b_: search backward
  139. -----------------------------------------------------------------------------------
  140. _B_: helm-buffers _l_: avy-goto-line
  141. _m_: helm-mini _i_: ace-window
  142. _R_: helm-recentf
  143.  
  144. _n_: Navigate _._: mark position _/_: jump to mark
  145. "
  146. ("c" avy-goto-char-2)
  147. ("C" avy-goto-char)
  148. ("L" avy-goto-char-in-line)
  149. ("w" avy-goto-word-1)
  150. ;; jump to beginning of some word
  151. ("W" avy-goto-word-0)
  152. ;; jump to subword starting with a char
  153. ("s" avy-goto-subword-1)
  154. ;; jump to some subword
  155. ("S" avy-goto-subword-0)
  156.  
  157. ("l" avy-goto-line)
  158. ("i" ace-window)
  159.  
  160. ("h" helm-org-headlines)
  161. ("a" helm-org-agenda-files-headings)
  162. ("q" helm-multi-swoop-org)
  163.  
  164. ("o" helm-occur)
  165. ("p" swiper-helm)
  166.  
  167. ("f" isearch-forward)
  168. ("b" isearch-backward)
  169.  
  170. ("." org-mark-ring-push :color red)
  171. ("/" org-mark-ring-goto :color blue)
  172. ("B" helm-buffers-list)
  173. ("m" helm-mini)
  174. ("R" helm-recentf)
  175. ("n" hydra-navigate/body))
  176.  
  177. (global-set-key (kbd "s-g") 'goto/body)
Advertisement
Add Comment
Please, Sign In to add comment