;;; org.el --- Org appearance -*- lexical-binding: t; -*- ;;; Code: ;; Styled stars, bullets, tags, tables and blocks. (use-package org-modern :hook (org-mode . org-modern-mode)) (setq org-directory "~/Projects/notebook") (setq org-startup-indented t ; visual indent per level, no real spaces org-hide-emphasis-markers t ; *bold* shows bold, markers hidden org-pretty-entities t ; \rarr, \alpha etc. as symbols org-ellipsis " ▾" ; folded-heading marker org-startup-folded 'show2levels ; open with headings only org-fontify-whole-heading-line t org-fontify-done-headline t org-fontify-quote-and-verse-blocks t org-src-fontify-natively t ; highlight src blocks with their own mode org-src-tab-acts-natively t org-edit-src-content-indentation 0 org-return-follows-link t) ;; org-modern's recommended settings. (setq org-auto-align-tags nil org-tags-column 0 org-catch-invisible-edits 'show-and-error org-special-ctrl-a/e t org-insert-heading-respect-content t) (add-hook 'org-mode-hook #'visual-line-mode) ; wrap at window edge (add-hook 'org-mode-hook (lambda () (display-line-numbers-mode -1))) ; prose reads better without ;; doom-themes' own Org fontification fixes (blocks, headings). (doom-themes-org-config) ;; Heading sizes; 'user survives theme reloads, same as in init.el. (doom-themes-set-faces 'user '(org-document-title :height 1.3 :weight 'bold) '(org-level-1 :height 1.2 :weight 'bold) '(org-level-2 :height 1.15 :weight 'bold) '(org-level-3 :height 1.1 :weight 'bold) '(org-level-4 :height 1.0 :weight 'bold)) (defun my/notes-index () "Open the notes index." (interactive) (find-file (expand-file-name "index.org" org-directory))) (keymap-global-set "C-c n" #'my/notes-index) ;; Evil's TAB (= C-i, jump-forward) shadows Org's. Rebind for Org buffers only. (with-eval-after-load 'org (evil-define-key 'normal org-mode-map (kbd "TAB") #'org-cycle ; fold/unfold the heading at point (kbd "") #'org-cycle ; GUI emits , so bind both (kbd "RET") #'org-open-at-point (kbd "") #'org-shifttab)) ; S-TAB: cycle all headings ;;; org.el ends here