From 5f683cee8ec1ac54db064bff3cff047b73418cc7 Mon Sep 17 00:00:00 2001 From: Kat Huang Date: Mon, 14 Aug 2023 04:04:48 +0000 Subject: [PATCH] [Emacs] Add kat-mode --- dotfiles/emacs.d/.gitignore | 3 +- dotfiles/emacs.d/init.el | 6 ++++ dotfiles/emacs.d/kat-mode.org | 56 +++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 dotfiles/emacs.d/kat-mode.org diff --git a/dotfiles/emacs.d/.gitignore b/dotfiles/emacs.d/.gitignore index f06af5b0..a2cbca08 100644 --- a/dotfiles/emacs.d/.gitignore +++ b/dotfiles/emacs.d/.gitignore @@ -10,6 +10,7 @@ .tutor /eln-cache /transient +/tree-sitter README.el README.html ac-comphist.dat @@ -26,6 +27,7 @@ eproject.lst eshell ido.last jabber-avatar-cache +kat-mode.el org-caldav-* org-caldav-backup.org org-config.el @@ -49,4 +51,3 @@ uber.el url var xkcd -/tree-sitter diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index db081854..c96301ed 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -40,6 +40,7 @@ :config (setq max-specpdl-size 99999999)) +(defvar imalison:kat-mode nil) (setq custom-file "~/.emacs.d/custom-before.el") (setq load-prefer-newer t) @@ -62,6 +63,11 @@ (org-babel-load-file (concat (file-name-directory load-file-name) "README.org"))) +(when imalison:kat-mode + (let ((debug-on-error t)) + (org-babel-load-file + (concat (file-name-directory load-file-name) "kat-mode.org")))) + (when imalison:do-benchmark (benchmark-init/deactivate)) ;; Local Variables: diff --git a/dotfiles/emacs.d/kat-mode.org b/dotfiles/emacs.d/kat-mode.org new file mode 100644 index 00000000..c0c8ca7d --- /dev/null +++ b/dotfiles/emacs.d/kat-mode.org @@ -0,0 +1,56 @@ +* evil +#+begin_src emacs-lisp +(use-package evil + :demand t + :config + (progn + (evil-mode +1))) + +(use-package evil-leader + :demand t + :config + (global-evil-leader-mode)) + +(use-package evil-org + :demand t + :after (org evil-leader) + :config + (progn + (add-hook 'org-mode-hook 'evil-org-mode))) +#+end_src + +This makes evil-mode play nice with org-fc +#+begin_src emacs-lisp +(use-package org-fc + :demand t + :config + (progn + (evil-define-minor-mode-key '(normal insert emacs) 'org-fc-review-flip-mode + (kbd "RET") 'org-fc-review-flip + (kbd "n") 'org-fc-review-flip + (kbd "s") 'org-fc-review-suspend-card + (kbd "q") 'org-fc-review-quit) + + (evil-define-minor-mode-key '(normal insert emacs) 'org-fc-review-rate-mode + (kbd "a") 'org-fc-review-rate-again + (kbd "h") 'org-fc-review-rate-hard + (kbd "g") 'org-fc-review-rate-good + (kbd "e") 'org-fc-review-rate-easy + (kbd "s") 'org-fc-review-suspend-card + (kbd "q") 'org-fc-review-quit))) +#+end_src + +* Appearance +#+begin_src emacs-lisp +(setq imalison:dark-theme 'dracula) +#+end_src + + +* org-mode +#+begin_src emacs-lisp +(setq org-directory "~/org/") ; This is the directory where you want to save your Org files. Change as necessary. +(setq org-capture-templates nil) +(add-to-list 'org-capture-templates + '("j" "Journal" entry (file+datetree "~/org/daily-journal.org") + "* %?\nEntered on %U\n %i\n %a")) +#+end_src