org-mode: fix setting indent, add table header line mode
Fix hook function for org-indent-mode, was accidentally toggling every time the hook was called. Now wrapped in lambda function to fix this. Add hook to turn on org-table-header-line-mode, equivalent to freezing the header row in a spreadsheet program Move hook definition into org use-package config block
This commit is contained in:
parent
d83703e8a9
commit
2e74af0b09
|
@ -30,12 +30,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
|
||||||
org-refile-targets '((nil . (:maxlevel . 2))
|
org-refile-targets '((nil . (:maxlevel . 2))
|
||||||
(org-agenda-files . (:maxlevel . 2))))
|
(org-agenda-files . (:maxlevel . 2))))
|
||||||
|
|
||||||
;; Visually indent org-mode files to a given header level
|
|
||||||
(add-hook 'org-mode-hook #'org-indent-mode)
|
|
||||||
|
|
||||||
;; Enable auto-fill in org-mode buffers
|
|
||||||
(add-hook 'org-mode-hook #'turn-on-auto-fill)
|
|
||||||
|
|
||||||
(use-package org
|
(use-package org
|
||||||
:ensure t
|
:ensure t
|
||||||
:custom
|
:custom
|
||||||
|
@ -49,10 +43,18 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
|
||||||
(lua . t)
|
(lua . t)
|
||||||
(python . t)))
|
(python . t)))
|
||||||
:config
|
:config
|
||||||
|
;; Ensure tables and src blocks use fixed-pitch font
|
||||||
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
|
(set-face-attribute 'org-table nil :inherit 'fixed-pitch)
|
||||||
(set-face-attribute 'org-block nil :inherit 'fixed-pitch)
|
(set-face-attribute 'org-block nil :inherit 'fixed-pitch)
|
||||||
|
;; Let quote and verse blocks use variable-pitch font, if configured
|
||||||
(set-face-attribute 'org-quote nil :inherit 'variable-pitch)
|
(set-face-attribute 'org-quote nil :inherit 'variable-pitch)
|
||||||
(set-face-attribute 'org-verse nil :inherit 'variable-pitch))
|
(set-face-attribute 'org-verse nil :inherit 'variable-pitch)
|
||||||
|
;; Visually indent org-mode files to a given header level
|
||||||
|
(add-hook 'org-mode-hook #'(lambda () (org-indent-mode +1)))
|
||||||
|
;; Enable auto-fill in org-mode buffers
|
||||||
|
(add-hook 'org-mode-hook #'turn-on-auto-fill)
|
||||||
|
;; Freeze org-table header row when scrolling past
|
||||||
|
(add-hook 'org-mode-hook #'(lambda () (org-table-header-line-mode +1))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Keymaps
|
* Keymaps
|
||||||
|
|
Loading…
Reference in a new issue