summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-05-13 16:54:15 +0300
committerThanos Apollo <[email protected]>2023-05-13 16:54:15 +0300
commit48ed2671815b2549b641a08d4ce57a0a5ebf179c (patch)
tree42217fbaa3bb390cf203312acaedaf2cc3eb7f71
parent38cfc0f3105020db87908dc7fd9e12c383ddce3e (diff)
emacs: Add org-roam
-rwxr-xr-xemacs.org47
1 files changed, 41 insertions, 6 deletions
diff --git a/emacs.org b/emacs.org
index 2a6fc4a..d88cddb 100755
--- a/emacs.org
+++ b/emacs.org
@@ -44,6 +44,7 @@ Request the following packages:
password-store
org
org-modern
+ org-roam
visual-fill-column
rainbow-delimiters
flycheck
@@ -337,9 +338,36 @@ Hook with ~dired-mode~
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode)
#+end_src
* Org-mode
-** org-make-toc
+** Org-Roam
#+begin_src emacs-lisp
- (add-hook 'org-mode-hook 'org-make-toc-mode)
+ ;; Set directory & autocompletions
+ (setq org-roam-directory "~/Notes")
+ ;; Activate autosync
+ (org-roam-db-autosync-enable)
+ ;; Keybindings
+ (global-set-key (kbd "C-c n l") 'org-roam-buffer-toggle)
+ (global-set-key (kbd "C-c n f") 'org-roam-node-find)
+ (global-set-key (kbd "C-c n i") 'org-roam-node-insert)
+ (define-key org-mode-map (kbd "C-c c") 'completion-at-point)
+#+end_src
+*** Templates
+#+begin_src emacs-lisp
+ (setq org-roam-capture-templates
+ '(("d" "default" plain
+ "%?"
+ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
+ :unnarrowed t)
+ ("b" "book notes" plain
+ (file "~/Notes/Templates/BookNoteTemplate.org")
+ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
+ :unnarrowed t)
+ ("l" "programming language" plain
+ "* Characteristics\n\n- Family: %?\n- Inspired by: \n\n* Reference:\n\n"
+ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
+ :unnarrowed t)
+ ("p" "MUS" plain "* Goals\n\n%?\n\n* Tasks\n\n** TODO Add initial tasks\n\n* Dates\n\n"
+ :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+filetags: MUS")
+ :unnarrowed t)))
#+end_src
** Themes
*** Dracula
@@ -484,8 +512,13 @@ Hook with ~dired-mode~
"CANCELLED(c)" ))
org-superstar-headline-bullets-list '("◉" "●" "○" "●" "○" "●" "◆")
org-superstar-itembullet-alist '((?+ . ?➤) (?- . ?✦))) ;; changes +/- symbols in item lists)
-
- ;; Hooks
+#+end_src
+Keybindings:
+ #+begin_src emacs-lisp
+ (define-key org-mode-map (kbd "C-c t") 'org-time-stamp-inactive)
+ #+end_src
+Hooks:
+#+begin_src emacs-lisp
(add-hook 'org-mode-hook 'apollo/org-theme-gruvbox)
(add-hook 'org-mode-hook 'flyspell-mode)
(add-hook 'org-mode-hook 'toc-org-mode)
@@ -879,6 +912,8 @@ Create function to watch videos using ~mpv~
(defalias 'o 'find-file)
+ (add-to-list 'eshell-visual-commands "mocp")
+
(add-hook 'eshell-alias-load-hook 'eshell-load-bash-aliases)
#+end_src
** Prompt
@@ -1197,8 +1232,6 @@ Create function to watch videos using ~mpv~
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
- (global-set-key (kbd "C-c c") 'copy-region-as-kill)
-
;; Pass
(global-set-key (kbd "C-c p i") 'password-store-insert)
(global-set-key (kbd "C-c p e") 'password-store-edit)
@@ -1227,3 +1260,5 @@ Create function to watch videos using ~mpv~
(define-key thanos/vterm-map (kbd "o") 'multi-vterm)
#+end_src
+
+