Display horizontal rulers in Org files as a full-width line
This commit is contained in:
parent
16e31aec48
commit
2ceecc5a21
@ -1290,6 +1290,25 @@ This emulates how Orgzly work with my current settings.
|
||||
(org-set-property "CREATED" timestamp)))
|
||||
#+end_src
|
||||
|
||||
*** Display horizontal rulers as a full-width line
|
||||
|
||||
From [[https://matrix.to/#/@suckless_shill:matrix.org][viz]] in the [[https://matrix.to/#/#org-mode:matrix.org][org-mode]] Matrix room.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun vz/org-fontify-horizontal-break ()
|
||||
"Display Org’s horizontal break (-----) as a full-width horizontal line"
|
||||
(push '("^[[:space:]]*\\(------*\\)\n"
|
||||
(0 (progn
|
||||
(put-text-property (match-beginning 1) (match-end 1)
|
||||
'display (make-string (- (match-end 1) (match-beginning 1)) ?\s))
|
||||
(put-text-property (match-beginning 1) (match-end 0)
|
||||
'face '(:strike-through t :extend t)))))
|
||||
org-font-lock-extra-keywords)
|
||||
(setq-local font-lock-extra-managed-props (cons 'display font-lock-extra-managed-props)))
|
||||
|
||||
(add-hook 'org-font-lock-set-keywords-hook #'vz/org-fontify-horizontal-break)
|
||||
#+end_src
|
||||
|
||||
** Org Roam
|
||||
|
||||
Let’s see if i can get my brain more organised this way…
|
||||
|
Loading…
Reference in New Issue
Block a user