Signed-off-by: Magic_RB <magic_rb@redalder.org>
2.5 KiB
Org Mode
I used to respect the 80 column limit, but why waste all the space when it can be dynamic. In this way all of the available screen space is utilized.
(add-hook 'org-mode-hook 'visual-line-mode)
Enable "fake" indentation in org-mode
, in other words, add indentation using overlays, but on disk the buffer is not indented.
(add-hook 'org-mode-hook 'org-indent-mode)
Increase the size of headings, in my personal opinion this makes the headings stand out a bit more and therefore easier to read.
(custom-set-faces
'(org-level-1 ((t (:inherit outline-1 :height 1.25))))
'(org-level-2 ((t (:inherit outline-2 :height 1.2))))
'(org-level-3 ((t (:inherit outline-3 :height 1.15))))
'(org-level-4 ((t (:inherit outline-4 :height 1.10))))
'(org-level-5 ((t (:inherit outline-5 :height 1.05)))))
Babel
Enable tangle on save
, big thanks to Diego Zamboni for his amazing booklet about Literate Configuration.
(add-hook 'org-mode-hook
(lambda () (add-hook 'after-save-hook #'org-babel-tangle :append :local)))
After executing a source code block with org-babel
, redisplay inline images, this speeds up the REPL-like workflow a lot.
(add-hook 'org-babel-after-execute-hook 'org-redisplay-inline-images)
Enable additional babel languages.
(org-babel-do-load-languages
'org-babel-load-languages
(cl-map 'list (lambda (lang) `(,lang . t))
'(python R shell dot latex)))
Latex
For previews, create SVGs and not PNGs or something, use the dvisvgm
command.
(setq org-preview-latex-default-process 'dvisvgm)
Enable org-fragtog
. When point is on a LaTeX fragment, it will automatically remove the preview otherwise show it.
(use-package org-fragtog
:straight t
:hook ((org-mode . org-fragtog-mode))
:config
(setq org-fragtog-ignore-predicates
'(org-at-table-p)))
Adjust size of LaTeX previews.
(setq org-format-latex-options (plist-put org-format-latex-options :scale 1.75))