]> git.donarmstrong.com Git - lib.git/blob - emacs_el/configuration/don-hydra.el
fix missing ) for org-mode
[lib.git] / emacs_el / configuration / don-hydra.el
1
2 (require 'hydra)
3 (require 'outline)
4
5 ;; org mode files
6 (defhydra my/hydra-orgmodes (:color blue :hint nil)
7   "
8 _n_: notes _c_: chaim _w_: wildman _o_: ool
9 _u_: uddin _s_: steve _r_: refile  _f_: fh    
10 _p_: read papers      _R_: paper notes
11 _h_: hpcbio
12 _q_: quit
13 _z_: quit
14 "
15   ("n" (find-file "~/projects/org-notes/notes.org"))
16   ("c" (find-file "~/projects/org-notes/chaim.org"))
17   ("w" (find-file "~/projects/org-notes/wildman.org"))
18   ("u" (find-file "~/projects/org-notes/uddin.org"))
19   ("o" (find-file "~/projects/org-notes/ool.org"))
20   ("f" (find-file "~/projects/org-notes/fh.org"))
21   ("s" (find-file "~/projects/org-notes/sndservers.org"))
22   ("r" (find-file "~/projects/org-notes/refile.org"))
23   ("p" (find-file "~/projects/research/papers_to_read.org"))
24   ("R" (find-file "~/projects/research/paper_notes.org"))
25   ("h" (find-file "~/projects/org-notes/hpcbio.org"))
26   ("q" nil "quit")
27   ("z" nil "quit")
28   )
29 (global-set-key (kbd "C-c 2") 'my/hydra-orgmodes/body)
30 (global-set-key (kbd "C-c @") 'my/hydra-orgmodes/body)
31
32
33 ;; from https://github.com/abo-abo/hydra/wiki/Emacs
34 (defhydra my/hydra-outline (:color pink :hint nil)
35   "
36 ^Hide^             ^Show^           ^Move
37 ^^^^^^------------------------------------------------------
38 _q_: sublevels     _a_: all         _u_: up
39 _t_: body          _e_: entry       _n_: next visible
40 _o_: other         _i_: children    _p_: previous visible
41 _c_: entry         _k_: branches    _f_: forward same level
42 _l_: leaves        _s_: subtree     _b_: backward same level
43 _d_: subtree
44
45 "
46   ;; Hide
47   ("q" hide-sublevels)    ; Hide everything but the top-level headings
48   ("t" hide-body)         ; Hide everything but headings (all body lines)
49   ("o" hide-other)        ; Hide other branches
50   ("c" hide-entry)        ; Hide this entry's body
51   ("l" hide-leaves)       ; Hide body lines in this entry and sub-entries
52   ("d" hide-subtree)      ; Hide everything in this entry and sub-entries
53   ;; Show
54   ("a" show-all)          ; Show (expand) everything
55   ("e" show-entry)        ; Show this heading's body
56   ("i" show-children)     ; Show this heading's immediate child sub-headings
57   ("k" show-branches)     ; Show all sub-headings under this heading
58   ("s" show-subtree)      ; Show (expand) everything in this heading & below
59   ;; Move
60   ("u" outline-up-heading)                ; Up
61   ("n" outline-next-visible-heading)      ; Next
62   ("p" outline-previous-visible-heading)  ; Previous
63   ("f" outline-forward-same-level)        ; Forward - same level
64   ("b" outline-backward-same-level)       ; Backward - same level
65   ("z" nil "leave"))
66
67 (global-set-key (kbd "C-c #") 'my/hydra-outline/body) ; by example
68 (global-set-key (kbd "C-c 3") 'my/hydra-outline/body) ; by example
69
70 (provide 'don-hydra)