[hydra] remove programming hydra

This commit is contained in:
contrapunctus 2021-07-31 15:26:42 +05:30
parent 38324e0cdd
commit 321517a863
1 changed files with 21 additions and 39 deletions

View File

@ -1701,51 +1701,33 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
"Prolog"
("r" ediprolog-dwim "REPL")
("i" (find-file "~/.emacs.d/init.org") "open init")
("d" dired-jump "dired-jump")
("u" find-file "new")
("o" save-buffer "save")
("k" (kill-buffer (current-buffer)) "kill")
("N" contrapunctus-line-display-hydra/body "line display")
("w" contrapunctus-window-hydra/body "window")
("c" chronometrist "chronometrist")
("m" magit-status "Magit")
("G" contrapunctus-programming-hydra/body "up"))
#+END_SRC
*** Programming
#+BEGIN_SRC emacs-lisp
(defhydra contrapunctus-programming-hydra (:color blue)
"Which language?"
("e" cp-el/body "Emacs Lisp")
("c" cp-cs/body "CHICKEN Scheme")
("g" cp-guile/body "Guile")
("L" cp-ly/body "Lilypond")
("l" cp-cl/body "Common Lisp")
("O" cp-org/body "Org")
("p" cp-prolog/body "Prolog")
("0" delete-window "delete this" :color red)
("1" delete-other-windows "delete others" :color red)
("2" split-window-below "split below" :color red)
("3" split-window-right "split right" :color red)
("i" (find-file "~/.emacs.d/init.org") "open init")
("a" my-app-hydra/body "applications")
("z" my-app-hydra/body "applications")
("C" contrapunctus-mc-hydra/body "multiple cursors")
("d" dired-jump "dired-jump")
("u" find-file "new")
("o" save-buffer "save")
("D" (cp-insert-timestamp t) "date")
("h" helpful-at-point "Help")
("i" (find-file "~/.emacs.d/init.org") "open init")
("I" contrapunctus-info-hydra/body "Info")
("k" (kill-buffer (current-buffer)) "kill")
("N" contrapunctus-line-display-hydra/body "line display")
("w" contrapunctus-window-hydra/body "window")
("c" chronometrist "chronometrist")
("m" magit-status "Magit")
("E" toggle-debug-on-error "tdoe")
("o" save-buffer "save")
("Q" toggle-debug-on-quit "tdoq")
("G" contrapunctus-general-hydra/body "up")
("D" (cp-insert-timestamp t) "date"))
("s" imenu-list "sidebar")
("T" cp-insert-timestamp "timestamp")
("u" find-file "new")
("U" launch-file "launch-file")
("v" find-alternate-file "revert")
("w" contrapunctus-window-hydra/body "window"))
#+END_SRC
*** Programming
Don't try to check if there are files with a certain extension...it will lead to false positives.
#+BEGIN_SRC emacs-lisp
(defun contrapunctus-programming-hydra-dispatch-language ()
(defun my-dispatch-hydra ()
(interactive)
(cond ((derived-mode-p 'emacs-lisp-mode
'inferior-emacs-lisp-mode
@ -1764,15 +1746,15 @@ Don't try to check if there are files with a certain extension...it will lead to
(t (error "Couldn't detect Scheme implementation."))))
((derived-mode-p 'lisp-mode 'slime-repl-mode)
(cp-cl/body))
((derived-mode-p 'prolog-mode)
(cp-prolog/body))
((derived-mode-p 'org-mode)
(cp-org/body))
((derived-mode-p 'prog-mode)
(contrapunctus-programming-hydra/body))
(t (contrapunctus-general-hydra/body))))
(define-key boon-command-map (kbd "m") #'contrapunctus-programming-hydra-dispatch-language)
(global-set-key (kbd "C-s") #'contrapunctus-programming-hydra-dispatch-language)
(define-key boon-command-map (kbd "C-s") #'contrapunctus-programming-hydra-dispatch-language)
(define-key boon-command-map (kbd "m") #'my-dispatch-hydra)
(global-set-key (kbd "C-s") #'my-dispatch-hydra)
(define-key boon-command-map (kbd "C-s") #'my-dispatch-hydra)
#+END_SRC
** eshell