aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorAdrian Kummerlaender2020-06-16 22:01:54 +0200
committerAdrian Kummerlaender2020-06-16 22:01:54 +0200
commit23db3f4f7c4755f7b6115f67ca7407b4e5513686 (patch)
treec2f487ba036a7e214e8ebf48aaa26c8915066ff1 /gui
parentbb3993e18156b3c8b3077f36f3962bcbdbf84995 (diff)
downloadnixos_home-23db3f4f7c4755f7b6115f67ca7407b4e5513686.tar
nixos_home-23db3f4f7c4755f7b6115f67ca7407b4e5513686.tar.gz
nixos_home-23db3f4f7c4755f7b6115f67ca7407b4e5513686.tar.bz2
nixos_home-23db3f4f7c4755f7b6115f67ca7407b4e5513686.tar.lz
nixos_home-23db3f4f7c4755f7b6115f67ca7407b4e5513686.tar.xz
nixos_home-23db3f4f7c4755f7b6115f67ca7407b4e5513686.tar.zst
nixos_home-23db3f4f7c4755f7b6115f67ca7407b4e5513686.zip
Add basic Org mode menu based on Hydra
Diffstat (limited to 'gui')
-rw-r--r--gui/conf/init.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/gui/conf/init.el b/gui/conf/init.el
index 3209653..215b95b 100644
--- a/gui/conf/init.el
+++ b/gui/conf/init.el
@@ -67,6 +67,9 @@
(setq doom-modeline-vcs-max-length 24)
(setq doom-modeline-minor-modes t))
+(use-package hydra
+ :ensure t)
+
(use-package evil
:ensure t
:init
@@ -179,9 +182,20 @@
(add-hook 'org-mode-hook 'evil-org-mode)
(evil-org-set-key-theme '(navigation insert textobjects additional todo)))
+(defhydra hydra-org-mode ()
+ "Org mode"
+ ("e" org-babel-execute-buffer "Execute buffer" :column "Babel")
+ ("t" org-babel-tangle "Tangle" :column "Babel")
+
+ ("i" org-toggle-inline-images "Toggle images" :column "Preview")
+ ("l" org-latex-preview "Toggle LaTeX" :column "Preview")
+
+ ("q" nil "Exit menu" :column "Other"))
+
(evil-define-key 'normal org-mode-map
"J" 'org-next-visible-heading
"K" 'org-previous-visible-heading
+ "m" 'hydra-org-mode/body
(kbd "<return>") 'org-open-at-point)
(use-package ivy