diff --git a/elisp/extras.el b/elisp/extras.el index b7e87b0..40c54e1 100644 --- a/elisp/extras.el +++ b/elisp/extras.el @@ -11,33 +11,27 @@ ;; Set column width to 88 characters (setq-default fill-column 88) -;;;; Load my packages -;; Default theme -;; (use-package zenburn-theme -;; :demand t -;; :config -;; (load-theme 'zenburn t)) - (load-theme 'modus-vivendi-tinted t) ;; QOL packages (use-package helpful - :bind (("C-h f" . #'helpful-callable) - ("C-h v" . #'helpful-variable) - ("C-h k" . #'helpful-key) - ("C-h x" . #'helpful-command))) + :bind (("C-h f" . helpful-callable) + ("C-h v" . helpful-variable) + ("C-h k" . helpful-key) + ("C-h x" . helpful-command))) ;; Org (use-package org ;; The following binds are always needed. Why? - :bind (("\C-cl" . 'org-store-link) - ("\C-ca" . 'org-agenda) - ("\C-cc" . 'org-capture)) + :bind (("\C-cl" . org-store-link) + ("\C-ca" . org-agenda) + ("\C-cc" . org-capture)) :hook ((org-shiftup-final . windmove-up) (org-shiftleft-final . windmove-left) - (org-shiftdown-final-hook . windmove-down) + (org-shiftdown-final . windmove-down) (org-shiftright-final . windmove-right)) :config (load "~/.emacs.d/elisp/org-setup.el")) + (use-package org-ref) ;; Writing @@ -56,12 +50,12 @@ ;; Reading (use-package nov + :hook ((nov-mode . visual-line-mode) + (nov-mode . visual-fill-column-mode) + (nov-mode . writeroom-mode)) :config - (setq nov-text-width t) - (setq visual-fill-column-center-text t) - (add-hook 'nov-mode-hook 'visual-line-mode) - (add-hook 'nov-mode-hook 'visual-fill-column-mode) - (add-hook 'nov-mode-hook 'writeroom-mode) + (setq nov-text-width t + visual-fill-column-center-text t) (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))) (use-package pdf-tools @@ -85,7 +79,7 @@ ;; git (use-package magit :demand t - :bind ("C-x g" . 'magit-status)) + :bind ("C-x g" . magit-status)) ;; code completion (use-package company @@ -96,7 +90,7 @@ ;; TODO I'm only using demand so is set from the start (use-package treemacs :demand t - :bind ("" . 'treemacs)) + :bind ("" . treemacs)) ;; Javascript and React (use-package rjsx-mode diff --git a/elisp/org-setup.el b/elisp/org-setup.el index 04e391c..393ca0d 100644 --- a/elisp/org-setup.el +++ b/elisp/org-setup.el @@ -7,44 +7,34 @@ org-src-fontify-natively t org-src-tab-acts-natively t org-hide-emphasis-markers t - org-babel-python-command "python3") - - + org-babel-python-command "python3" + ;; default apps to open files with org-mode + org-file-apps '((auto-mode . emacs) + ("\\.mm\\'" . default) + ("\\.pdf\\'" . "emacsclient %s") + ("\\.djvu\\'" . "djview %s")) + ;; define sequence of TODO keywords + org-todo-keywords '((sequence "TODO" "IN PROGRESS" "|" "DONE")) + ;; Use biber to process bibtex + org-latex-pdf-process '("xelatex -interaction nonstopmode -output-directory %o %f" + "biber %b" + "xelatex -interaction nonstopmode -output-directory %o %f" + "xelatex -interaction nonstopmode -output-directory %o %f") + ;; org-capture templates + org-capture-templates '(("l" "Library" entry (file "~/library/index.org") + "* %A %^g\n %^{Author}p\n %^{Edition}p\n %^{Format}p") + ("m" "Albums" entry (file "~/repos/listas/music.org") + "* %? %^g\n %^{Autor}p\n %^{Ano}p\n %^{Colecionado}p") + ("n" "Quick notes" item (file "~/org/quick.org")))) ;; load languages babel (org-babel-do-load-languages 'org-babel-load-languages '((C . t) (js . t) (emacs-lisp . t) - ;(eukleides . t) TODO search for ob-eukleides + ;; (eukleides . t) TODO search for ob-eukleides (haskell . t) (scheme . t) (shell . t) (python . t) (plantuml . t))) - -;; default apps to open files with org-mode -(setq org-file-apps - '((auto-mode . emacs) - ("\\.mm\\'" . default) - ("\\.pdf\\'" . "emacsclient %s") - ("\\.djvu\\'" . "djview %s"))) - -;; define sequence of TODO keywords -(setq org-todo-keywords - '((sequence "TODO" "IN PROGRESS" "|" "DONE"))) - -;; Use biber to process bibtex -(setq org-latex-pdf-process - '("xelatex -interaction nonstopmode -output-directory %o %f" - "biber %b" - "xelatex -interaction nonstopmode -output-directory %o %f" - "xelatex -interaction nonstopmode -output-directory %o %f")) - -;; org-capture templates -(setq org-capture-templates - '(("l" "Library" entry (file "~/library/index.org") - "* %A %^g\n %^{Author}p\n %^{Edition}p\n %^{Format}p") - ("m" "Albums" entry (file "~/repos/listas/music.org") - "* %? %^g\n %^{Autor}p\n %^{Ano}p\n %^{Colecionado}p") - ("n" "Quick notes" item (file "~/org/quick.org"))))